cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to split an xml for multiple Web service submits?

acesario
Contributor II

I am pulling data from a db connection with multiple rows, and forming that into an xml. I am able to submit this against a web service, but what I need to do is to break down the xml by record for submission to the web service, one at a time.

For example:
โ€œRecordโ€:[{โ€ฆ1.}]โ€ฆ
โ€œRecordโ€:[{โ€ฆ2.}]โ€ฆ
โ€œRecordโ€:[{โ€ฆ3.}]โ€ฆ

Current xml looks something like this:
"File
Record
โ€ฆ1โ€ฆ
Record
record
โ€ฆ2โ€ฆ
Record
Record
โ€ฆ3โ€ฆ
Record
File

Desired XML
File
Record
โ€ฆ1โ€ฆ
/Record
/File
Put the aboveโ€ฆthenโ€ฆ
File
Record
โ€ฆ2โ€ฆ
/Record
/File
Put #2 the aboveโ€ฆthenโ€ฆ
โ€ฆetc

Is there a way to break up the xml, and loop through the submits in SnapLogic?

1 ACCEPTED SOLUTION

Yes, you can use an XML Formatter at that point to get the document back into XML.

View solution in original post

3 REPLIES 3

cjhoward18
Employee
Employee

I think you are just looking for the XML Parser snap. That should be able to split your xml document into smaller sub documents.

acesario
Contributor II

Thank you for the response. The parser takes my xml out of xml format, and back into JSONโ€ฆcorrect?
In which case I do not have xml to use for the SOAP Execute and would need to remap etc to submit โ€ฆ correct?

Yes, you can use an XML Formatter at that point to get the document back into XML.