Back to Devexpress

XmpDocument.CreateArray(String, XmpArrayType) Method

officefileapi-devexpress-dot-pdf-dot-xmp-dot-xmpdocument-dot-createarray-x28-system-dot-string-devexpress-dot-pdf-dot-xmp-dot-xmparraytype-x29.md

latest3.0 KB
Original Source

XmpDocument.CreateArray(String, XmpArrayType) Method

Adds an array at the end of the packet.

Namespace : DevExpress.Pdf.Xmp

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public XmpArray CreateArray(
    string qualifiedName,
    XmpArrayType arrayType
)
vb
Public Function CreateArray(
    qualifiedName As String,
    arrayType As XmpArrayType
) As XmpArray

Parameters

NameTypeDescription
qualifiedNameString

The array’s qualified name ( prefix:local format).

| | arrayType | XmpArrayType |

The array type.

|

Returns

TypeDescription
XmpArray

An empty XMP array.

|

Exceptions

TypeDescription
ArgumentException

Thrown if the prefix specified in the qualifiedName method parameter is not registered.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateArray(String, XmpArrayType) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

pdf-document-api-xmp-example/CS/XmpMetadataExamples/Program.cs#L87

csharp
// Add items with "xmp" prefix:
XmpArray array = document.CreateArray("xmp:Identifier", XmpArrayType.Unordered);
array.Add("identifier1");

pdf-document-api-xmp-example/VB/XmpMetadataExamples/Program.vb#L68

vb
' Add items with "xmp" prefix:
Dim array As XmpArray = document.CreateArray("xmp:Identifier", XmpArrayType.Unordered)
array.Add("identifier1")

See Also

XmpDocument Class

XmpDocument Members

DevExpress.Pdf.Xmp Namespace