Hi,
I want to read an xml file like
<data>
<temp>300</temp>
<visc>10</visc>
</data>
using c++. however, I don't have any experience with xml and c++. Could somebody help me out of how to start?
Thanks
Arnie
Hello Arnie, I'd like to ask you what do you want to do with this XML file. Is the xml file extraordinarily large?
See, there are two kinds of xml reading applications that can be used (xml parsers). One is called DOM and one is called SAX. DOM collects all the data in the xml file and creates a "tree" which you can afterwards navigate easily to get to whatever piece of data you desire (to see an example of it used and if you might use firefox lookup its DOM Inspector, remember that DOM inspector you need to check when you're installing, it's not there by default). On the other hand SAX is an "event-based" parser. It reads the file and reports back "events" such as "start-element", "end-element", "characters", etc. To read more about it look at
http://www.saxproject.org/
Depending on what you want to do with the xml file, and its contents and size, one is more suitable then the other.
Good luck with whatever you have to do...
-blazed