It is currently Tue Apr 25, 2017 7:17 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 3 posts ] 
Author Message
 Post subject: Parsing XML files in C++
PostPosted: Fri Dec 13, 2013 11:21 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
It would be nice to see a short series on how to parse XML files to extract data from for use within a program. Also how to create a script engine that would take your classes or structure data and write them to an XML file structure. Using the idea of XML Schema would be nice too.


Offline
 Profile  
 
 Post subject: Re: Parsing XML files in C++
PostPosted: Fri Dec 13, 2013 11:40 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
http://xerces.apache.org/xerces-c/

Xerces is the xml parser that I've used on a number of occasions for different clients in the past.


Offline
 Profile  
 
 Post subject: Re: Parsing XML files in C++
PostPosted: Sat Dec 14, 2013 3:16 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
Thank you for the tip, I was thinking about trying to make a small application that would read and display an eBook while playing its audio book equivalent and while the audio book is playing back the narrated audio the program display would have text highlighting. I think this would be a neat project to work on. I know there are apps that already exist to do this for tablets and smart phones and probably the pc too, but I think it would be something to strengthen my programming skills. When I started to read about the eBook file formats I found that most of them are done in a xml file format and use the xml schema as well. This got me into looking for how to read and parse xml data using c++. I found some tutorials online but many were hard to follow, some where easy to follow but required a 3rd party library for a fee. I wasn't sure which direction to go. Some of the libraries I have seen are tinyXML, XmlLite, Liquid XML, CMarkup and others. I also found this site that talks about XML data binding opposed to parsing http://www.codesynthesis.com/products/xsd/. I'll take your library into consideration. The biggest thing is if all I needed to do was read in the data from the file to process the books content to highlight text while the audio playback is pronouncing that word a basic parsing library would be all that I need. However, when I was reading the eBooks specifications the most popular file format that is used uses XML Schema and I believe the files are strongly typed with special specifications. Any kind of feedback on this topic would be very appreciative.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron