DIAdem Help

Method: Exists for DocumentNamespaces <DataPlugin>

  • Updated2024-09-12
  • 1 minute(s) read

Method: Exists for DocumentNamespaces <DataPlugin>

Specifies whether a namespace of a document already exists. Use namespaces to group XML elements in a document.

bExists = Object.Exists(sName)
ObjectDocumentNamespaces <DataPlugin>
Object with this method
sNameString
Specifies the name of the namespace.
bExistsBoolean
Specifies whether the namespace with the specified name already exists (TRUE) or not (FALSE).

The following example transfers only the properties of a specific namespace of the document into the data set properties:

Dim sNamespace, oMyNamespaceProps, oMyProp
sNamespace = "http://ns.adobe.com/xap/1.0/"
If Document.Namespaces.Exists(sNamespace) Then 
  Set oMyNamespaceProps = Document.Namespaces(sNamespace).Properties
  For each oMyProp in oMyNamespaceProps
    Call Root.Properties.Add(oMyProp.Name, oMyProp.Value)
  Next
End If