Page 1 of 1

XML Input to capture repetition elements

Posted: Thu Mar 27, 2008 2:28 pm
by reddy
Hi,

I am trying to capture all the information including repetition elements from XML. I can only capture different values for the key element specified and for all the other elements i get repeated information same as the first record.

Example: Let us say this is my XML.

<customers>
<customer id="55000">
<name>Charter Group</name>
<address>
<street>100 Main</street>
<city>Framingham</city>
<state>MA</state>
<zip>01701</zip>
</address>
<address>
<street>720 Prospect</street>
<city>Boston</city>
<state>MA</state>
<zip>01210</zip>
</address>
<address>
<street>120 Ridge</street>
<city>waltham</city>
<state>MA</state>
<zip>01760</zip>
</address>
</customer>
</customers>

when i designate "/customers/customer/address/city/text()" as my repetition element i get the result as follows

55000,"Charter Group","100 Main","Framingham","MA","01701"
55000,"Charter Group","100 Main","Boston","MA","01701"
55000,"Charter Group","100 Main",Waltham,"MA","01701".

I am looking for a result like as follows

55000,"Charter Group","100 Main","Framingham","MA","01701"
55000,"Charter Group","720 Prospect","Boston","MA","01210"
55000,"Charter Group","120 Ridge",Waltham,"MA","01760"


Can anyone please help. Thanks in advance.

reddy

Posted: Thu Mar 27, 2008 4:31 pm
by lstsaur
I can't even reproduce the same output that you got. Make sure the XPath in the output's Columns Description as follows:
/customers/customer/@id
/customers/customer/name/text()
/customers/customer/address/street/text()
/customers/customer/address/city/text()------key "yes"
/customers/customer/address/state/text()
/customers/customer/address/zip/text()

Good luck.

Posted: Thu Mar 27, 2008 5:04 pm
by reddy
This is a sample xml. The actualu xml i am working is huge. I have imported the column definitions directly from teh schema file and i havent changed them.


reddy