---
title: "XmpValue"
url: "https://reference.aspose.com/pdf/java/com.aspose.pdf/xmpvalue/"
product: "Aspose.PDF for Java API Reference"
description: "Represents XMP value"
---

**Inheritance:**
java.lang.Object, com.aspose.pdf.XmpValue

```
public class XmpValue extends Object
```

Represents XMP value

## Constructors

| Constructor | Description |
| --- | --- |
| [XmpValue](#XmpValue-java.util.Date-) | Constructor for date time value. |
| [XmpValue](#XmpValue-double-) | Constructor for floating point Value. |
| [XmpValue](#XmpValue-int-) | Consructor for integer value. |
| [XmpValue](#XmpValue-java.lang.Object-) |  |
| [XmpValue](#XmpValue-java.lang.String-) | Constructor for string value. |
| [XmpValue](#XmpValue-java.lang.String-boolean-) | Initializes new string XMP value. |
| [XmpValue](#XmpValue-com.aspose.pdf.XmpValue:A-) | Constructor for array value. |

## Methods

| Method | Description |
| --- | --- |
| [isArray](#isArray--) | Returns true is XmpValue is array. |
| [isDateTime](#isDateTime--) | Returns true if value is DateTime. |
| [isDouble](#isDouble--) | Returns true if value is floating point value. |
| [isField](#isField--) | Returns true if XmpValue is field. |
| [isInteger](#isInteger--) | Returns true if value is integer. |
| [isNamedValue](#isNamedValue--) | Returns true if XmpValue is named value. |
| [isNamedValues](#isNamedValues--) | Returns true is XmpValue represents named values. |
| [isRaw](#isRaw--) | Value is unsupported/unknown and raw XML code is provided. |
| [isString](#isString--) | Returns true if value is string. |
| [isStructure](#isStructure--) | Returns true is XmpValue represents structure. |
| [to_](#to_-com.aspose.pdf.XmpValue-) | Converts XmpValue into array. |
| [to_Array](#to_Array-com.aspose.pdf.XmpValue-) | Converts XmpValue to array. |
| [to_Generic](#to_Generic-com.aspose.pdf.XmpValue-) | Get KeyValuePair array |
| [to_KeyValuePair](#to_KeyValuePair-com.aspose.pdf.XmpValue-) | Converts XmpValue to named value. |
| [to_String](#to_String-com.aspose.pdf.XmpValue-) | Converts XmpValue into string. |
| [to_XmpValue](#to_XmpValue-java.util.Date-) | Converts DateTime into XmpValue. |
| [to_XmpValue](#to_XmpValue-double-) | Converts double into XmpValue. |
| [to_XmpValue](#to_XmpValue-int-) | Converts integer into XmpValue. |
| [to_XmpValue](#to_XmpValue-java.lang.Object:A-) | Converts array to XmpValue. |
| [to_XmpValue](#to_XmpValue-java.lang.String-) | Converts string to XmpValue. |
| [toArray](#toArray--) | Returns array. |
| [toDateTime](#toDateTime--) | Converts to date time. |
| [toDateTimeOffset](#toDateTimeOffset--) | Converts the current XMP value to a {@link DateTimeOffset} representation. |
| [toDictionary](#toDictionary--) | Returns dictionary which contains named values. |
| [toDouble](#toDouble--) | Converts to double. |
| [toField](#toField--) | Returns XMP value as XMP field. |
| [toInteger](#toInteger--) | Converts to integer. |
| [toNamedValue](#toNamedValue--) | Returns XMP value as named value. |
| [toNamedValueInternal](#toNamedValueInternal--) | For Internal usage only |
| [toNamedValues](#toNamedValues--) | Returns XMP value as named value collection. |
| [toNamedValuesInternal](#toNamedValuesInternal--) |  |
| [toRaw](#toRaw--) | Raw XML code for unknown/unsupported values. |
| [toString](#toString--) | Returns string representation of XmpValue. |
| [toString](#toString-com.aspose.ms.System.IFormatProvider-) | Returns string representation of XmpValue. |
| [toStringValue](#toStringValue--) | Converts to string. |
| [toStructure](#toStructure--) | Returns XMP value as structure (set of fields). |

### XmpValue {#XmpValue-java.util.Date-}
Constructor for date time value.

### XmpValue {#XmpValue-double-}
```
public XmpValue(double value)
```

Constructor for floating point Value.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value |  | Double value. |

### XmpValue {#XmpValue-int-}
```
public XmpValue(int value)
```

Consructor for integer value.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value |  | Integer value. |

### XmpValue {#XmpValue-java.lang.Object-}


### XmpValue {#XmpValue-java.lang.String-}
Constructor for string value.

### XmpValue {#XmpValue-java.lang.String-boolean-}
Initializes new string XMP value.

### XmpValue {#XmpValue-com.aspose.pdf.XmpValue:A-}
Constructor for array value.

### isArray {#isArray--}
```
public boolean isArray()
```

Returns true is XmpValue is array.

**Returns:**
boolean value

### isDateTime {#isDateTime--}
```
public boolean isDateTime()
```

Returns true if value is DateTime.

**Returns:**
boolean value

### isDouble {#isDouble--}
```
public boolean isDouble()
```

Returns true if value is floating point value.

**Returns:**
boolean value

### isField {#isField--}
```
public boolean isField()
```

Returns true if XmpValue is field.

**Returns:**
boolean value

### isInteger {#isInteger--}
```
public boolean isInteger()
```

Returns true if value is integer.

**Returns:**
boolean value

### isNamedValue {#isNamedValue--}
```
public boolean isNamedValue()
```

Returns true if XmpValue is named value.

**Returns:**
boolean value

### isNamedValues {#isNamedValues--}
```
public boolean isNamedValues()
```

Returns true is XmpValue represents named values.

**Returns:**
boolean value

### isRaw {#isRaw--}
```
public final boolean isRaw()
```

Value is unsupported/unknown and raw XML code is provided.

**Returns:**
True if value returned as raw data.

### isString {#isString--}
```
public boolean isString()
```

Returns true if value is string.

**Returns:**
boolean value

### isStructure {#isStructure--}
```
public boolean isStructure()
```

Returns true is XmpValue represents structure.

**Returns:**
boolean value

### to_ {#to_-com.aspose.pdf.XmpValue-}
Converts XmpValue into array.

### to_Array {#to_Array-com.aspose.pdf.XmpValue-}
Converts XmpValue to array.

### to_Generic {#to_Generic-com.aspose.pdf.XmpValue-}
Get KeyValuePair array

### to_KeyValuePair {#to_KeyValuePair-com.aspose.pdf.XmpValue-}
Converts XmpValue to named value.

### to_String {#to_String-com.aspose.pdf.XmpValue-}
Converts XmpValue into string.

### to_XmpValue {#to_XmpValue-java.util.Date-}
Converts DateTime into XmpValue.

### to_XmpValue {#to_XmpValue-double-}
```
public static XmpValue to_XmpValue(double value)
```

Converts double into XmpValue.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value |  | double value (Value to convert) |

**Returns:**
XmpValue instance

### to_XmpValue {#to_XmpValue-int-}
```
public static XmpValue to_XmpValue(int value)
```

Converts integer into XmpValue.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value |  | int value (Value to convert) |

**Returns:**
XmpValue instance

### to_XmpValue {#to_XmpValue-java.lang.Object:A-}
Converts array to XmpValue.

### to_XmpValue {#to_XmpValue-java.lang.String-}
Converts string to XmpValue.

### toArray {#toArray--}
```
public XmpValue [] toArray()
```

Returns array.

**Returns:**
XmpValue array

### toDateTime {#toDateTime--}
```
public Date toDateTime()
```

Converts to date time.

**Returns:**
Date instance

### toDateTimeOffset {#toDateTimeOffset--}
```
public final com.aspose.ms.System.DateTimeOffset toDateTimeOffset()
```

Converts the current XMP value to a {@link DateTimeOffset} representation.

**Returns:**
A {@link DateTimeOffset} that represents the current XMP value.

### toDictionary {#toDictionary--}
```
public final com.aspose.ms.System.Collections.Generic.Dictionary< String , XmpValue > toDictionary()
```

Returns dictionary which contains named values.

**Returns:**
Dictionary

### toDouble {#toDouble--}
```
public double toDouble()
```

Converts to double.

**Returns:**
double value

### toField {#toField--}
```
public XmpField toField()
```

Returns XMP value as XMP field.

**Returns:**
XmpField instance

### toInteger {#toInteger--}
```
public int toInteger()
```

Converts to integer.

**Returns:**
int value

### toNamedValue {#toNamedValue--}
```
public HashMap < String , XmpValue > toNamedValue()
```

Returns XMP value as named value.

**Returns:**
(Named value) HashMap instance with String Key and XmpValue value

### toNamedValueInternal {#toNamedValueInternal--}
```
public com.aspose.ms.System.Collections.Generic.KeyValuePair< String , XmpValue > toNamedValueInternal()
```

For Internal usage only

**Returns:**
For Internal usage only

### toNamedValues {#toNamedValues--}
```
public HashMap < String , XmpValue > toNamedValues()
```

Returns XMP value as named value collection.

**Returns:**
(Named collection value) HashMap instance with String Key and XmpValue value

### toNamedValuesInternal {#toNamedValuesInternal--}
```
public com.aspose.ms.System.Collections.Generic.KeyValuePair< String , XmpValue >[] toNamedValuesInternal()
```



### toRaw {#toRaw--}
```
public final com.aspose.ms.System.Xml.XmlNode toRaw()
```

Raw XML code for unknown/unsupported values.

**Returns:**
XML node for this value.

### toString {#toString--}
```
public String toString()
```

Returns string representation of XmpValue.

**Returns:**
String representation

### toString {#toString-com.aspose.ms.System.IFormatProvider-}
Returns string representation of XmpValue.

**Returns:**
String representation

### toStringValue {#toStringValue--}
```
public String toStringValue()
```

Converts to string.

**Returns:**
String value

### toStructure {#toStructure--}
```
public XmpField [] toStructure()
```

Returns XMP value as structure (set of fields).

**Returns:**
XmpField array
