How to filter XML records
Posted: Mon Apr 07, 2014 6:24 pm
As per the requirement need to read one of the XML file and separate same XML records into another file based on lookup file.
Input
<Mid> 230 </Mid>
<Memname>Frank</Memname>
<Memaddr>123 Ave Raod</Memaddr>
<Memphone>234908789 </Memphone>
<Mid> 130 </Mid>
<Memname>James</Memname>
<Memaddr>6780 Old Traf Road</Memaddr>
<Memphone>567123490</Memphone>
<Mid> 330 </Mid>
<Memname>Tawan</Memname>
<Memaddr>789 Dogules Road</Memaddr>
<Memphone>3458902567 </Memphone>
<Mid> 430 </Mid>
<Memname></Memname>
<Memaddr>4560 North Ave Road</Memaddr>
<Memphone>3412345690 </Memphone>
Lookup File->MID (330,230)
Out put .xml
<Mid> 330 </Mid>
<Memname>Tawan</Memname>
<Memaddr>789 Dogules Road</Memaddr>
<Memphone>3458902567 </Memphone>
<Mid> 230 </Mid>
<Memname>Frank</Memname>
<Memaddr>123 Ave Raod</Memaddr>
<Memphone>234908789 </Memphone>
Right now XML file reading through External source stage->XML input file-Dataset.
Please let me know how to filter XML records based on lookup value and create XML file same format.
Input
<Mid> 230 </Mid>
<Memname>Frank</Memname>
<Memaddr>123 Ave Raod</Memaddr>
<Memphone>234908789 </Memphone>
<Mid> 130 </Mid>
<Memname>James</Memname>
<Memaddr>6780 Old Traf Road</Memaddr>
<Memphone>567123490</Memphone>
<Mid> 330 </Mid>
<Memname>Tawan</Memname>
<Memaddr>789 Dogules Road</Memaddr>
<Memphone>3458902567 </Memphone>
<Mid> 430 </Mid>
<Memname></Memname>
<Memaddr>4560 North Ave Road</Memaddr>
<Memphone>3412345690 </Memphone>
Lookup File->MID (330,230)
Out put .xml
<Mid> 330 </Mid>
<Memname>Tawan</Memname>
<Memaddr>789 Dogules Road</Memaddr>
<Memphone>3458902567 </Memphone>
<Mid> 230 </Mid>
<Memname>Frank</Memname>
<Memaddr>123 Ave Raod</Memaddr>
<Memphone>234908789 </Memphone>
Right now XML file reading through External source stage->XML input file-Dataset.
Please let me know how to filter XML records based on lookup value and create XML file same format.