🔒 Locked
which xml parser?
Advertisement
Original Post
1. You can't use C++ project in C (but the other way around is legal). My best advice here is that you should learn C++ (if you already know C it won't be that hard)
2. TinyXML can be static library (you have to compile it yourself, so you are free to make any choice)
3. Search at Sourceforge for sth like "XML parser C" - should help
Cheers
2. TinyXML can be static library (you have to compile it yourself, so you are free to make any choice)
3. Search at Sourceforge for sth like "XML parser C" - should help
Cheers
What about libXml, that's written in C and has wrappers for many other languages.
libxml looks good, problem is its a bit confusing. On the examples page (here) there are loads of different examples of all kinds of things. Im a bit confused at which is what i would want to do in my program. I want to load a file with all the information about a level into a few different structure arrays. I dont see the difference between "Parse an XML file to a tree and free it" and "Parse an XML file with an xmlReader". Sorry if im being stupid.
parse into a tree reads the WHOLE thing into the tree ... then you use tree ops to walk and browse the tree data as needed ...
parse using a reader is like reading from a stream ... you pull nodes (or possibly it pushes nodes) - as it encounters them ...
so while using the reader version ... the library doesn't keep things like
in memory while your down at the bottom of the file reading:
...
but the tree versions let you do cool stuff like use XPath that you cannot do using the reader system ...
in other words, think of the reader as being like iostreams ... and the tree version as being like having it stored in memory in a random access collection.
parse using a reader is like reading from a stream ... you pull nodes (or possibly it pushes nodes) - as it encounters them ...
so while using the reader version ... the library doesn't keep things like
in memory while your down at the bottom of the file reading:
...
but the tree versions let you do cool stuff like use XPath that you cannot do using the reader system ...
in other words, think of the reader as being like iostreams ... and the tree version as being like having it stored in memory in a random access collection.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement