One Star

[XML] Reading nested NodeSets / NodeLists

I have run into a bit of a dead-end with reading XML. I can use tExtractXMLField to parse an XML file via XPath, but I cannot think of how to parse said XML when there are multiple nested node lists.
Easier illustrated via an example:

In the above case, the NodeSet of <person> has an "XPath Loop Query" (within Talend) of "/database/people/person". Within that NodeSet, we have XPath "./name" for <name> and "./child" for another NodeSet of <child>. Assuming there was just one child, one could simply use tExtractXMLField set up ala:
XPath Loop Query: /database/people/person
Column | XPath
Name | ./name
Child | ./child
./child is a NodeSet however, and I imagine simply calling ./child will return the first (or the last?) one only. I need to figure out how to, given the above mock XML, end up with an array of pairs (personName,child) for every child. I am currently exploring the 'Get Nodes' option, but I cannot seem to find any concrete docs that would allow me to solve the above situation.
Any help would be greatly appreciated!
One Star

Re: [XML] Reading nested NodeSets / NodeLists

Try starting with child rather than person. A child's always going to have a parent person and probably a name, so that's the most reliable driver. See this blog post that recommends analyzing the XML from the bottom up (rather than top down).
One Star

Re: [XML] Reading nested NodeSets / NodeLists

I am really impressed with your writing skills as well as with the layout on your weblog. bodybuilding supplements Is this a paid theme or did you customize it yourself? Anyway keep up the excellent quality writing, it?s rare to see a nice blog like this one these days..

Re: [XML] Reading nested NodeSets / NodeLists

For detailed explanation of reading and processing XML file with multiple nested loops visit the blog post