from_ method

from_

def from_(cls, array, type):
    ...
Parameter Type Description
array
type XmpArrayType

from_

Creates an XmpArray instance from a string array.

def from_(cls, array, type):
    ...
Parameter Type Description
array list[str] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray.

Returns: XmpArray: An XmpArray containing all the elements from the original array.

Example

from groupdocs.metadata.standards.xmp import XmpArray, XmpArrayType

arr = XmpArray.from_(["Aspose", "GroupDocs"], XmpArrayType.ORDERED)

from_

Creates an XmpArray instance from an integer array.

def from_(cls, array, type):
    ...
Parameter Type Description
array list[int] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray.

Returns: An XmpArray containing all the elements from the original array.

Example

from groupdocs.metadata.standards.xmp import XmpArray, XmpArrayType

# Create an ordered XMP array from a list of strings
company_array = XmpArray.from_(["Aspose", "GroupDocs"], XmpArrayType.ORDERED)

from_

Creates an XmpArray instance from a date array.

def from_(cls, array, type):
    ...
Parameter Type Description
array list[datetime] The array to create an XmpArray from.
type XmpArrayType The type of the XmpArray.

Returns: XmpArray: An XmpArray containing all the elements from the original array.

Example

from groupdocs.metadata.standards.xmp import XmpArray, XmpArrayType

companies = ["Aspose", "GroupDocs"]
xmp_array = XmpArray.from_(companies, XmpArrayType.ORDERED)

from_

Creates an XmpArray instance from a list.

def from_(cls, array, type):
    ...
Parameter Type Description
array list[float] The list to create an XmpArray from.
type XmpArrayType The type of the XmpArray.

Returns: XmpArray: An XmpArray containing all the elements from the original list.

Example

from groupdocs.metadata.standards.xmp import XmpArray, XmpArrayType

# Create an ordered XMP array from a list of strings
company_array = XmpArray.from_(["Aspose", "GroupDocs"], XmpArrayType.ORDERED)

See Also