Description
Builds a PBDOM_DOCUMENT from a string.
Syntax
pbdom_builder_name.BuildFromString(string strXMLStream)
Argument |
Description |
---|---|
pbdom_builder_name |
The name of a PBDOM_BUILDER object |
strXMLStream |
A string containing XML |
Return value
PBDOM_DOCUMENT.
Throws
EXCEPTION_INVALID_ARGUMENT -- The input string is invalid. This can happen if it has not been initialized properly or is a null object reference.
EXCEPTION_MEMORY_ALLOCATION_FAILURE -- Insufficient memory was encountered while executing this method.
Examples
The following PowerScript code fragment demonstrates how to use the BuildFromString method with an input string. A string containing XML is passed to the BuildFromString method and the return value is assigned to a PBDOM_DOCUMENT.
PBDOM_Builder pbdom_bldr pbdom_document pbdom_doc string strXML strXML = "<Music:abc xmlns:ZMusic=" strXML += "~"http://www.ZMusic.com~">" strXML += "Root Element Data<data>ABC Data" strXML += "<inner_data>My Inner Data</inner_data>" strXML += "My Data</data></abc>" pbdom_bldr = Create PBDOM_Builder pbdom_doc = pbdom_bldr.BuildFromString (strXML)
Usage
The encoding specified in the XML export template determines the encoding of the document created using BuildFromString.
See also