Contact Free trial Login

DOM/XML Transformers

Mule contains several transformers that convert between a W3C DOM object and its serialized representation. The DomToXml transformer converts DOM objects to XML, the XmlToDom transformer converts XML strings to DOM objects, and the DomToOutputHandler transformer converts from a DOM to an OutputHandler serialization.

These transformers support the standard transformer attributes. In addition, they support the following configuration.

xslt: Unexpected program error: java.lang.NullPointerException
xslt: Unexpected program error: java.lang.NullPointerException
xslt: Unexpected program error: java.lang.NullPointerException

Example

To use the DOM/XML transformers, you add them to your Mule XML configuration as follows:

<xm:dom-to-xml-transformer name="DomToXml"/>
<xm:xml-to-dom-transformer name="xmlToDom" returnClass="org.w3c.dom.Document" />
<xm:xml-to-output-handler-transformer name="xmlToOutputHandler" />

You can then reference them by name from endpoints:

<vm:inbound-endpoint name="testEndpoint" path="another.queue" connector-ref="vmConnector1" transformer-refs="DomToXml" />
...
<vm:outbound-endpoint ref="xml-dom-out" transformer-refs="xmlToDom" />
...

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.