DOM to XML transformer logic

风流意气都作罢 提交于 2021-02-08 02:10:29

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/40661582/dom-to-xml-transformer-logic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!