Good morning,
I've been trying with various libraries (everything from pugixml to RapidXML) but have been unable to parse a simple XML file. I want to grab all the inner text of each page->text into separate std::string's., so 1 page per std::string.
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.
How do I parse an XML file?
Page 1 of 16 Replies - 1366 Views - Last Post: 09 November 2011 - 02:19 AM
Replies To: How do I parse an XML file?
#2
Re: How do I parse an XML file?
Posted 08 November 2011 - 10:24 AM
Post the code that is causing problem in code tags. If the code does not compile without errors, post the complete error messages exactly as they appear in your development environment.
If the code does compile ask specific questions on the code you post.
Also crossposted here.
Jim
If the code does compile ask specific questions on the code you post.
Also crossposted here.
Jim
This post has been edited by jimblumberg: 08 November 2011 - 10:26 AM
#3
Re: How do I parse an XML file?
Posted 08 November 2011 - 07:12 PM
The code does compile (pugixml doesn't link, but I added that info the the ideone paste)
RapidXML doesn't give me an error though, it just doesn't print anything other than the first node's name to stdout.
RapidXML doesn't give me an error though, it just doesn't print anything other than the first node's name to stdout.
#4
Re: How do I parse an XML file?
Posted 08 November 2011 - 09:21 PM
#5
Re: How do I parse an XML file?
Posted 08 November 2011 - 10:43 PM
With TinyXML did you try the define before the header file? :
#define TIXML_USE_STL YES #include "tinyxml.h"
#6
Re: How do I parse an XML file?
Posted 08 November 2011 - 11:03 PM
#7
Re: How do I parse an XML file?
Posted 09 November 2011 - 02:19 AM
Figured out the rapidxml version.
Page 1 of 1

New Topic/Question
Reply



MultiQuote





|