Integration Server 10.5 | Built-In Services Reference Guide | XML Folder | Summary of Elements in this Folder | pub.xml:xmlStringToXMLNode
 
pub.xml:xmlStringToXMLNode
WmPublic. Converts an XML document (represented as a String, byte[ ], or InputStream) to an XML node.
An XML node is a special representation of an XML document that can be consumed by the Integration Server. Most webMethods services that operate on XML documents require an XML node as input.
Input Parameters
xmldata
String Optional. String containing the XML document to convert to an XML node.
Note:
If you specify xmldata, do not specify $filedata or $filestream.
$filedata
byte[ ] Optional. byte[ ] containing the XML document to convert to an XML node.
Note:
If you specify $filedata, do not specify xmldata or $filestream.
$filestream
java.io.InputStream Optional. InputStream containing the XML document to convert to an XML node.
Note:
If you specify $filestream, do not specify xmldata or $filedata.
encoding
String Optional. Character encoding in which text is represented. Specify UTF-8 for XML files and ISO-8859-1 for HTML files. To have the parser attempt to detect the type of encoding, specify autoDetect (the default, if encoding is not specified).
expandDTD
String Optional. Flag indicating whether references to parameter entities in the XML document's DTD are to be processed. Set to:
*true to expand references to parameter entities to their full definition.
*false to ignore references to parameter entities. This is the default.
isXML
String Optional. Flag specifying whether the input document is XML or HTML. (xmlStringToXMLNode must know this so that it can parse the document correctly.) Set to:
*autoDetect to parse the document based on its type. When you use this option, xmlStringToXMLNode detects the document's type based on its <!DOCTYPE...\> or <?XML...\> tag. If it cannot determine a document's type, it parses it as HTML. This is the default.
*true to parse the document as XML.
*false to parse the document as HTML.
expandGeneralEntities
String Optional. Flag indicating whether pub.xml:xmlStringToXMLNode should expand references to general entities in the XML document’s DTD. Set to:
*true to expand references to general entities to their full definition. This is the default.
*false to ignore references to general entities.
validateXML
String. Optional. Flag indicating whether Integration Server validates the incoming XML document to determine whether it is well-formed XML before converting the XML document. Set to:
*true to validate the incoming XML. If validation fails, the service ends with a ServiceException.
*false to skip validation. This is the default.
Output Parameters
node
com.wm.lang.xml.Node XML node representation of the XML document in xmlData. This object can be used as input to webMethods services that consume XML nodes.
Usage Notes
The input parameters xmldata, $filedata, and $filestream are mutually exclusive. Specify only one of the preceding parameters. Integration Server checks the parameters in the following order, using the value of the first parameter with a specified value: $filedata, $filestream, and xmldata.
If expandGeneralEntities is not specified, Integration Server uses the value in watt.core.xml.expandGeneralEntities. If watt.core.xml.expandGeneralEntities is not set, the references to general entities are always expanded.
Use the pub.xml:xmlStringToEnhancedXMLNode service to convert an XML document to an XML node using the enhanced XML parser. For more information about the legacy XML parser and the enhanced XML parser, see webMethods Integration Server Administrator’s Guide.