2

Can someone please explain to me why a DOM to XML transformer converts the output of a Web Service Consumer to an XML String representation? The output of the Web Service Consumer is a org.mule.module.ws.consumer.NamespaceRestorerXMLStreamReader.

According to the official docs:

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.

They refer to a W3C DOM object, which is to my knowledge the html DOM that is used in web browsers?

Thanks

html_programmer
  • 18,126
  • 18
  • 85
  • 158
  • It converts an XML payload (Document, XML stream, Source, etc.) to a serialized String representation not only W3C DOM. see https://docs.mulesoft.com/mule-user-guide/v/3.6/domtoxml-transformer – user3520080 Nov 18 '16 at 15:47

1 Answers1

0

It refers to a org.w3c.dom.Document which in Java can represent either HTML or XML. In Mule an XML is just a string containing the XML. You can use the DOM interface to operate in the XML nodes using Java APIs or the string XML when needed.

aled
  • 21,330
  • 3
  • 27
  • 34