954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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. 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.

AlecTaylor
Newbie Poster
3 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

My tinyXML attempt: https://ideone.com/yC1l8

(still not working)

AlecTaylor
Newbie Poster
3 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

Figured out the rapidxml version.

AlecTaylor
Newbie Poster
3 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: