0

I am trying to parse one quite big XML file using PugiXML which I find easy enough to understand. My problem is that in the XML file I have multiple elements with the same name and inside them other elements with the same name too. The only way I found to properly parse it is by gaining access to each element using find_child_by_attribute() method but the code becomes huge as I need to iterate through each nest and keep data for each element in order to then use that method to find the element I want. So my question is: Can you propose an efficient way to parse an xml file with multiple elements with same names and inside them the same etc?

Spyros
  • 682
  • 7
  • 18
  • 37
  • recursion is your friend – Eamonn McEvoy Feb 19 '14 at 11:20
  • 1
    Your explanation does not make much sense, because typically elements of the same type, and hence with the same name, occur more than once in an XML document. Example XML, and perhaps processing code, demonstrating your problem would help. – arayq2 Apr 04 '14 at 14:56

0 Answers0