Language Reference Guide : 4. System Classes : XMLDocument Class : ParseString Method
 
Share this page                  
ParseString Method
The ParseString method parses the string and sets the RootElement attribute representing the tree-based XML document. If validateschema=TRUE it also performs validation of the document against a schema referenced within the same document. The string must contain characters in the local codepage (II_CHARSET). It must not contain an “encoding” XML processing instruction attribute.
This method has the following syntax:
integer = XMLDocument.ParseString(string = StringObject
          [, validateschema = integer[, schemacache = XMLSchemaCache]])
This method has the following parameters:
string
(Required) Specifies the stringobject
validateschema
Specifies whether the method should validate the document against the referenced schema. Valid values are TRUE or FALSE. For more information, see XMLSchemaCache Class.
Default: FALSE
schemacache
Specifies the XMLSchemaCache used for schema validation. This parameter is used only if validateschema is TRUE. For more information, see XMLSchemaCache Class.
If the method is successful, it returns ER_OK; otherwise, it returns ER_FAIL. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.