Integration Server 10.3 | Built-In Services Reference Guide | XML Folder | Summary of Elements in this Folder | pub.xml:xmlStringToEnhancedXMLNode
 
pub.xml:xmlStringToEnhancedXMLNode
WmPublic. Converts an XML document (represented as a String, byte[ ], or InputStream) to an org.w3c.dom.Node object using the enhanced XML parser.
An DOM node is a special representation of an XML document that can be consumed by any program that uses standard DOM APIs. The pub.xml:xmlNodeToDocument service accepts a DOM object 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).
inputProcessing
Document. Optional. Contains a set of input parameters that instruct Integration Server how to read the XML document. The fields are comparable to options in the javax.xml.stream.XMLInputFactory class.
Key
Description
isValidating
String Optional. Determines whether Integration Server performs DTD validation. Set to:
*true to perform DTD validation.
*false to disable DTD validation. This is the default.
isNamespaceAware
String Optional. Determines whether Integration Server provides namespace processing for XML 1.0 support while parsing the XML document. Set to:
*true to enable namespace processing. This is the default.
*false to disable namespace processing.
isCoalescing
String Optional. Determines whether Integration Server coalesces adjacent character data while parsing the XML document. Set to:
*true to coalesce adjacent character data.
*false to indicate that Integration Server does not coalesce adjacent character data. This is the default.

isReplacingEntity References
String Optional. Determines whether, while parsing the XML document, Integration Server replaces internal entity references with replacement text and treats them as characters. Set to:
*true to replace entity references.
*false to indicate entity references will not be replaced. This is the default.

isSupporting ExternalEntities
String Optional. Determines whether Integration Server resolves external parsed entities while parsing the XML document. Set to:
*true to resolve external parsed entities.
*false to indicate Integration Server does not support external parsed entities.
The JVM in which Integration Server runs determines the default.
supportDTD
String Optional. Determines whether Integration Server supports DTDs while parsing the XML document. Set to:
*true to support DTDs while parsing the XML document.
*false to disable support of DTDs while parsing the XML document. This is the default.
partitionSize
String Optional. Specifies the size, measured in bytes, of the partitions on the heap where the enhanced XML parser stores parsed document information. Specify a suffix of “k” to indicate kilobytes or “m” to indicate megabytes. For example, 10k or 10m.
If you do not specify a value, Integration Server uses the default partition size value specified on the Settings > Enhanced XML Parsing screen in Integration Server Administrator.
Output Parameters
node
org.w3c.dom.Node XML node representing the returned XML document. This object can be used as input to webMethods services that consume XML nodes in the form of a DOM object.
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 that has a specified value: $filedata, $filestream, and xmldata.
Use the pub.xml:xmlStringToXMLNode service to convert an XML document to an XML node using the legacy XML parser. For more information about the legacy XML parser and the enhanced XML parser, see webMethods Integration Server Administrator’s Guide.
Keep the following information in mind when specifying a partitionSize
*The partitionSize is a hint for the enhanced XML parser so that it can estimate the amount of heap space needed to parse the document. Often, it not possible to determine the size of an inbound XML document before parsing.
*As a general rule, Software AG recommends a partitionSize that is 1/2 the size of the unparsed XML document.
*A partitionSize that is considerably larger than 1/2 the size of the unparsed XML document causes the enhanced XML parser to consume more heap space than necessary but might also improve throughput. However, this can impact the overall performance of Integration Server.
*A partitionSize that is considerably smaller than 1/2 the size of the unparsed XML document causes the enhanced XML parser to create a large number of partitions to parse the document. While this might use less heap space, it may reduce the throughput of the parser.
*A partitionSize that is three times smaller or three times larger than 1/2 the size of the unparsed XML document will likely have little impact on the performance.
*At run time, the enhanced XML parser overrides a partitionSize that consumes all of the available heap space.
*At run time, if the partitionSize results in an initial heap allocation that exceeds the single document limit set in the Maximum heap allocation for any single document field the limit for all documents set in the Maximum heap allocation for all documents combined field, the enhanced XML parser reduces the partition size automatically. For more information about heap allocation limits for the enhanced XML parser, see webMethods Integration Server Administrator’s Guide
*If you do not specify partitionSize, the enhanced XML parser uses the default specified in the Default partition size field on the Settings > Enhanced XML Parsing page in Integration Server Administrator.