XML File Splitting Based on Content of the File

Hi,

I receive three types of flows in one XML file. So,I want to split the single XML files to three XML files based on the content related to each flow.
Can any one help me on this like how do I split the XML file.

Regards,
Srikanth

Hi Srikanth,
Can you please explain more what you mean by 3 types of flows in one XML?

Yes @Jaideep instead of flows you can consider it as type of data like Article, Item
and I need to get article data in one xml and Item data in another xml file.

Hi Srikanth,

You should be parsing the original XML and pull out the data for individual XML’s you need, map them to respective document types you would have created by each flow/data type.

As you already know which part or place the sub XML’s will be coming, so you can directly map it from that place to generated child XML’s.

Let us know if what we are thinking is wrong here about the requirement.

Regards,
Firoz N

Yes, this is very much doable as Firoz mentioned technique above and should output 1-n XML string objects (for each docType) and can be inline to your requirement.

HTH,
RMG

Yes @Firoz
I understood the process which you are saying. But I have doubt on how to use getXMlNodeIterator/queryXMLNode for parsing the XML file.
So, could you please suggest me which one is preferred to use and how do I parse the file using that service.

1 Like

Hi,

This is in general be used when you are dealing any large XML files processing requirements
(breaks in chunks node by node) and based on the IS memory/threshold configured to increase the throughput,thread performance etc…

Also for more information on usage of these pub.xml.query services you can refer the BIS guide:
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/integration_server/pie10-5/10-5_Integration_Server_Built_In_Services_Reference.pdf

HTH,
RMG

2 Likes