Query on pulling all XML data automatically

Hello all,

    I am working on Large XML files.When i am reading XML node the output is in single row and single column. I used XPath to pull all details from XML. Here i am facing a problem, i have to give manualy column name and XPath details but  i have number of documnets and no.of ENTITY's in one XML file. Some times i have 1000 and above documents and ENTITY's in one XML file so i can't give all Column names in XPaths manually. Now i need all documents and ENTITY's automatically can you please help me out.

Thanks in advance.

The XPath node allows you to assign column names based on an attribute or node inside the matched fragment.

Thanks for Quick reply. Is there any node to pull all ENTITY's automatically otherthan XPath?

Here I am attaching sample format of my xml data in txt file, I have 1000 and above documnets in one xml file like attachment and another attachment is output format which I required ( For each and every document child elements will be different).

So you want to use column names based on element names? I'm afraid this is currently not possible. You can use any element or attribute relative to the extractec element but not the element itself (see also https://tech.knime.org/forum/palladian-selenium/extract-node-names-as-column-headers-using-xpath-node). I will check if we can do something about it, but not promises.

There is one thing you could try. Convert it to a JSON (xml to json node) and afterwards use the json to table node. Than you have everything in one row.

Cheers, Iris

Hi Iris, In my example I don’t know neither how many columns there are nor the column names. How do I read data, just data from XML files. I tried converting to XML to JSON and it looks like it is taking forever. If you can help me on this this with an example if possible, would be great. Thank you, Hakan