Re: XML PARSER

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Peter Rilling (peter_at_nospam.rilling.net)
Date: 08/25/04


Date: Wed, 25 Aug 2004 16:05:13 -0700

Vague question but here we go.

First DOM and SAX are really the only way to go and they are competing
standards (competing in the since that they accomplish the parsing in
different ways). DOM basically builds a tree of the XML and allows you to
randomly access elements and attributes. SAX on the other hand is event
based meaning that the engine will read an element one at a time and then
send the element to your application for processing. It basically processes
the document from front to back.

What you us for a parser is really a matter of what environment you plan to
develop in. If you are going to use .NET, then you will probably use its
parser. Microsoft also the MSXML parser that was used prior to .NET. Their
languages or environments may have different parsers and there are probably
lots of parsers out there are people tend to reinvent the wheel.

XSLT is not a parser per say but is a "language" allowing you to transform
some XML structure into something else. XSLT is primarily used for
presentation where you might want to turn an XML document into HTML.

"andre@online.nospam" <andreonlinenospam@discussions.microsoft.com> wrote in
message news:FB4D368F-F74D-49CD-930C-EA7157BD14CF@microsoft.com...
> I am working on a project where I will be getting a XML file. What should
I
> use for a parser? I'm interested in what MS has to offer with the Visual
> studio .net platform.
>
> I was told DOM and SAX was what I should be looking at. Also, is XSLT a
> parser?
>
> I'm going to insert the data into a database.
>
> Thank you,
>



Relevant Pages

  • Re: Java with xml
    ... There are three main XML parsing techniques: ... - Document Object Model (DOM), ... Simple API for XML (SAX), ... built in memory. ...
    (comp.lang.java.programmer)
  • Re: Highspeed parsen - aber wie?
    ... AST) erzeugen sollte. ... Vergleiche das am besten mit SAX und DOM. ... der Parser Elemente und Attribute findet, ...
    (de.comp.lang.java)
  • Re: reading and displaying XML data in EVC++ 4.0
    ... This is for the XML DOM. ... You may also need to use XML SAX, which is an event driven parser. ... © 2003 Microsoft Corporation. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: XML CDATA special characters
    ... I didn't mention SAX, is that the standard PHP parser I'm using now? ... I'll just dive into DOM now and see where this will all end up. ... basic XML only has 5 pre-defined default entities. ... If you try and use HTML ...
    (comp.lang.php)
  • Re: torture
    ... If you're using Java 1.4 then you already have an XML parser built in to ... manipulable object representation of the XML document in memory. ... The SAX API works by reading the document and generating callbacks to ...
    (comp.lang.java.programmer)