How do I parse an XML file?
Good morning,
I've been trying with various libraries (everything from pugixml to RapidXML) but have been unable to parse a simple XML file.
My RapidXML attempt: https://ideone.com/XWylb
My pugiXML attempt: https://ideone.com/RzN6X
XML file: https://ideone.com/wrG13
Can you help me get one to work?
Thanks for all suggestions,
Alec Taylor
PS: Preferably I would like the RapidXML one to work.
Re: How do I parse an XML file?
My tinyXML attempt: https://ideone.com/yC1l8
(still not working)
Re: How do I parse an XML file?
If 3 different XML libraries have failed to parse this XML file, is it possible the file does not contain valid XML?
Re: How do I parse an XML file?
Quote:
Originally Posted by
Lindley
If 3 different XML libraries have failed to parse this XML file, is it possible the file does not contain valid XML?
I have included a copy of the XML, if you believe that to be the case, please attempt analysis yourself.
Re: How do I parse an XML file?
Your TinyXML implementation works just fine if you fix your type switching. It should be TiXmlNode::TINYXML_DOCUMENT not TiXmlNode::DOCUMENT, same with the others.
Re: How do I parse an XML file?
Figured out the rapidxml version.