INITIALIZE-DOCUMENT-TYPE( ) method
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Creates a new XML document, initializes the document based on the referenced DTD, and creates its root node.
Return type: LOGICAL
Applies to: X-document object handle
Syntax
|
- namespace-uri
- A character expression representing the namespace Uniform Resource Identifier (URI) you want associated with the root node of the XML document. The namespace-uri must be unique and persistent.
- root-node-name
- A character expression representing the name of the root node as defined in the XML document. If you are using namespaces and you want to associate a prefix with the namespace, you must qualify this node name with the namespace-uri and a colon character prefix (for example, namespace-uri:root-node-name). You must explicitly set the xmlns attribute on the root node.
- public-id
- An optional character expression representing the public ID of the DTD. Currently, there is no way to retrieve a DTD based on a public ID.
- system-id
- A required character expression representing the system ID of the DTD. This contains the path to the DTD which is either a file system path or an HTTP URL. The ABL parser uses this information to retrieve the DTD when parsing the document.
The following example initializes an X-DOCUMENT with a DTD reference and adds the proper namespace declaration, if the namespace URI is not empty:
|