I have made a simple service that takes a specific document type (describing an xml document) as a parameter and uses the documentToXMLString function to convert the document to a string.
The document may look like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
X
For some reason the documentToXMLString skips the outer tag.
Using Developer’s pipeline editor, create a child document named “Services” under the “document” input parameter of the pub.xml:documentToXMLString service. Map your “Services” document to that new child.
If you want your xml string to use a namespace prefix. Name the child document to prefix:Services and populate the nsdecls parameter to associate that prefix with a namespace value.