Quick Question: Expat vs LT XML

winderjj

Usenet Archive
Joined
Jul 30, 2003
Messages
2
Reaction score
0
Hi All,

I need everyones opinion. I am very new to XML but am temporarily putting all my efforts into using it. This is what I need to do.

Write an xml parser (in C) that will parse a fairly complicated XML file that is full of technical data(most scalar values). Then I need to store all the info in a C structure. Could some people give me their opinion. Which is better suited for this, Expat or LT xml?

I would also like to be able to validate the XML file against the DTD. Would one of these be able to do this? I noticed RXP might be good for this.

Any help/info would be greatly appreciated.

thanks.
 

Richard Tobin

Usenet Archive
Joined
Jan 6, 2000
Messages
4,251
Reaction score
0
winderjj wrote:
Write an xml parser (in C) that will parse a fairly complicated XML file that is full of technical data(most scalar values). Then I need to store all the info in a C structure. Could some people give me their opinion. Which is better suited for this, Expat or LT xml?

LT XML (which uses RXP as its parser) can read in XML either as "bits" or as a tree. If you want to convert it into your own C structure you will have to write code to traverse the tree (or build it from the bits).

Using RXP directly means using its rather unfriendly API (which is as it is for historical reasons). LT XML's API is nicer, but is in need of a clean-up. I hope to do an "LT XML 2" with a unified API for it and RXP, but I also hope to visit Mars some day.

I would also like to be able to validate the XML file against the DTD.

LT XML and RXP can both do DTD validation.

-- Richard
 

Toni Uusitalo

Usenet Archive
Joined
Jul 25, 2003
Messages
71
Reaction score
0
winderjj said:
Hi All,

I need everyones opinion. I am very new to XML but am temporarily putting all my efforts into using it. This is what I need to do.

Write an xml parser (in C) that will parse a fairly complicated XML file that is full of technical data(most scalar values). Then I need to store all the info in a C structure. Could some people give me their opinion. Which is better suited for this, Expat or LT xml?

I would also like to be able to validate the XML file against the DTD. Would one of these be able to do this? I noticed RXP might be good for this.

Any help/info would be greatly appreciated.

thanks.

If you must validate, RXP/LT might be only choice for C, I'm not absolutely sure... check http://www.xmlsoftware.com/parsers.html for example.

You might also give a try to Parsifal if you don't need validation and can live with UTF-8/latin characters, API is somewhat easier to use than Expat.
JUdge for yourself.

Toni Uusitalo
 

John Winderbaum

Usenet Archive
Joined
Jul 30, 2003
Messages
1
Reaction score
0
THanks everyone. I really appreciate the feedback.

After posting that first message I made alot more progress. I did decide to use libxml for my parsing needs. I did some investigation of discoved the api is much more friends and there is some good documentation.

I also began to fool around with RXP. I finally got is to validate some simple XML files against a DTD. All I need is to run it before starting up my system. Just to validate the data.

thanks for the comments. Am I making sense?
 

Toni Uusitalo

Usenet Archive
Joined
Jul 25, 2003
Messages
71
Reaction score
0
Toni Uusitalo said:
If you must validate, RXP/LT might be only choice for C, I'm not absolutely sure... check http://www.xmlsoftware.com/parsers.html for example.

You might also give a try to Parsifal if you don't need validation and can live with UTF-8/latin characters, API is somewhat easier to use than Expat.
JUdge for yourself.

Toni Uusitalo

silly me, I forgot libxml! That must be the most active and forked XML api for C.

Toni Uusitalo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top