Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Re: [Andy] Importing data

Quote Reply
Re: [Andy] Importing data In reply to
XML::Simple is a DOM parser.

Here's an quick explanation of the difference between SAX and DOM taken from http://www.webreference.com/xml/column11/3.html

Quote:

SAX vs. DOM
The DOM is a quite convenient way to access and manipulate XML data, but it comes with a price to pay:
  • The underlying XML needs to be fully parsed before processing can occur. As most DOM implementations are purely memory-based, this limits the amount of XML data that can be processed this way. Also the possiblity for pipelining various stages of processing is limited.
  • The DOM structure only defines generic nodes, whereas most languages are strongly typed so that one might want to map specific nodes to specific classes of say Java code.

SAX is more useful in cases where:
  • Huge amounts of XML need to be processed, but the information needed is highly local, meaning only a small amount of data needs to be stored. This is usually the case in transforming linear documents, where little cross-linking occurs.
  • Various stages of XML processing are interconnected to form a pipeline. The next stage can then begin its work as soon as the first character comes out of the previous one, instead of having to wait for the full document to be converted into objects.


I'm sure there are better explanations. There are lots of SAX parsers but they are all more complicated to program than XML::Simple. However, I think it is worth getting into if you are doing a lot of XML parsing.
Subject Author Views Date
Thread Importing data RoadRunner 5573 Aug 31, 2004, 3:05 PM
Thread Re: [RoadRunner] Importing data
Andy 5483 Sep 1, 2004, 12:21 AM
Thread Re: [Andy] Importing data
RoadRunner 5477 Sep 1, 2004, 6:39 AM
Thread Re: [RoadRunner] Importing data
Andy 5487 Sep 1, 2004, 7:06 AM
Thread Re: [Andy] Importing data
afinlr 5439 Sep 11, 2004, 9:50 AM
Thread Re: [afinlr] Importing data
Andy 5445 Sep 11, 2004, 10:24 AM
Thread Re: [Andy] Importing data
afinlr 5438 Sep 11, 2004, 11:30 AM
Thread Re: [afinlr] Importing data
Andy 5421 Sep 12, 2004, 11:40 PM
Thread Re: [Andy] Importing data
afinlr 5417 Sep 13, 2004, 3:36 AM
Post Re: [afinlr] Importing data
Andy 5419 Sep 13, 2004, 3:43 AM