Node to String

Hi all,

my external client is passing in calling one of my flow services using HTTP Post, and sending in an xml string inside the request body.

This xml string is defined as a Node in my flow service input.
When I call xmlNodeToDocument, there will be an error thrown because the xml in the node is not valid (not well-formed).

It is not possible for external client to fix the xml.
So, is there any other way for me to convert a Node into an XML string without using xmlNodeToDocument ?

Any tips on using Java to manipulate com.wm.lang.xml.Node/Document ??

You have the xml string in the request body. You would have the input in anyone format, either as String, or Bytes object or Stream object.

Use xmlString to node and xml node to document services to change it to IS document type.

xmlStringToXMLNode - it can take string / bytes / stream as input

unfortunately the xml string is not valid (not well-formed).
so when i call xmlNodeToDocument, it will not be able to validate the xml and throw an error.

If XML is not well formed, no parsers can parse the xml properly… You should have a valid xml format in order to parse…

Try using the service, map the node to the input “stream” and see if that will convert the incoming data to string.