cancel
Showing results for 
Search instead for 
Did you mean: 

XML convert string type

lneidig
New Contributor

How do I convert an XML string that is generated by the XML generator? I used the generate XML snap, run it through the XML format snap and then through an XML Parser. But it isn’t breaking up the string so that I can manipulate it. It’s still just a string.

image

image

2 REPLIES 2

cstewart
Former Employee

This pipeline shows how we do what you are looking for.
14
The XML Generator contains the following in the edit window:
28
With that data we map it in the mapper as follows, the output of the XML Generator is a string called xml.
We map that to the content field and also add the content-type for the Document to Binary Snap. This enables us to put the information in a native XML form, with the necessary metadata.:
57
Then we need to ensure no encoding takes place on the Doucment to Binary Snap, which converts the document input to a binary stream, like the output of a file reader:
15
After that, the XML parser can read the input stream as an XML binary document.
The output of the XML parser reads the data as follows:
34
Which we then need to split using the JSON splitter to process as individual documents:
30
And the final output of the splitter:
42

Let us know if this helps.

lneidig
New Contributor

Thank you! That worked!

I have another question for you. I am trying to integrate with Quickbooks desktop and it has a proprietary XML. I need a declaration <?qbxml version = "8.0"?>
image
image
but every time I pass it through the XML Parser, it cuts it out. Is there some way to set that?
image