CreateXmlDoc function
Syntax
CreateXmlDoc(XmlString, DTDValidation)
Description
Use the CreateXmlDoc function to create an XmlDoc object. If you specify a Null string for XmlString (""), you create an empty XmlDoc object.
Parameters
| Parameter | Description |
|---|---|
|
XmlString |
Specify an XML string that you want to convert into an XmlDoc object that you can then manipulate using PeopleCode. You can also specify a Null string ("") to generate an empty XmlDoc object. |
|
DTDValidation |
Specify whether a DTD should be validated. This parameter takes a boolean value. If you specify true, the DTD validation occurs if a DTD is provided. If you specify false, and if a DTD is provided, it is ignored and the XML isn't validated against the DTD. False is the default value. In the case of application messaging, if a DTD is provided, it's always ignored and the XML isn't validated against the DTD. If the XML cannot be validated against a DTD, an error is thrown saying that there was an XML parse error. |
Returns
A reference to the newly created XmlDoc object.
Example
The following creates an empty XmlDoc object.
Local XmlDoc &MyDoc;
&MyDoc = CreateXmlDoc("");
Considerations Using CreateXmlDoc
The following coding is either ignored or removed from the XmlDoc object that is created with this function:
-
encoding attributes
PeopleSoft only supports UTF-8 encoding. Any specified encoding statement is removed, as all XmlDoc objects are considered UTF-8.
-
version attributes
Regardless of what version is specified in XmlString, the version attribute in the generated XmlDoc object is 1.0.
Related Topics