PDA

View Full Version : XML Parsers..


ajain123
10-09-2003, 03:03 PM
I am new to XML and I have to find some notes about XML parsers. Can somebody suggest me some site where I can read about different Parsers and then select whichever is best for our Project....

Thanks a bunch.

Alex Vincent
10-11-2003, 02:44 AM
Well, half the question rests on "What do you want to do with XML?"

expat is the best known XML parser out there; Mozilla uses a four-year-old version of it. I'd look up sourceforge.net for that project.

Are you talking about browsable XML, transforming XML to another format, or using XML for data... we need a little more detail. Even then, we may not be able to help you much. I myself don't deal with parsers directly, only the DOM tree that DOM-oriented parsers put out. SAX-oriented parsers are something I'm totally unfamiliar with.

liorean
10-12-2003, 08:47 PM
Well, the purpose of the XML parser is to take a document in the form of either a string or a stream of characters, and produce an output from it that is either an object tree or a sax stream. This is what expat, MSXML, SXML/SSAX, Xerces and numerous other XML parsers does. They are rarely seen from the developer or user viewpoint, and which of them you use is largely a question of language preference and speed demand. expat is the fastest of them, to be sure. Since XML parsing is pretty straight forward you don't have to consider which of them is best/most complete, what you might instead be interested in is whether it's a nonvalidating, validating or validating-when-specified parser.

As such, a parser is seldom what you actually want or need. An XML parser doesn't actually achieve anything without it being attached to a renderer or handler of some sort, and the renderer/handler is far more complicated than the XML parser. And example of a handler would be a database interface, a DOM/SAX implementation, a validator (might be either the parser or a separate handler), an object reference tree. An example of a renderer would be a browser or a database indexer.

What's your project? I've often seen people asking for a parser when they actually need help with the usage/application of XML.

Shinni
01-18-2005, 09:45 AM
Hi ,

What all parsers are available to convert XMl documents to corresponding s-expression format ? I came through Oleg's SSAX framework, which is written in Scheme. Is there any other parser's avialable for xml 2 sxml conversion ? I read somewhere that expat can , but I did not find any programs in their distribution.

Thanks a lot

SSK

Alex Vincent
01-19-2005, 10:36 AM
I've never even heard of s-expressions. :) Can you give us a sample of what you've got and what you're trying to do?