Nmap Development mailing list archives

Re: XML libraries, anyone?


From: Brett Hutley <brett () hutley net>
Date: Tue, 27 Jun 2006 08:08:09 +0100


On 27 Jun 2006, at 03:24, stripe dog wrote:

Hey everybody,

I'm looking for recommendations for a small xml parsing library that
can handle large files (as the nmap xml output files can be large when
a large network is scanned), and is licensed under BSD or LGPL.

Any personal favorites? Any stinkers to avoid?

I can do all sorts of searches and research on my own, what I am
looking for is personal experience (either first hand hearsay;-) with
any of the popular open source libraries.

There are 2 basic kinds of XML parsers; SAX-based and DOM-based.

DOM-based parsers create a tree in memory of the XML nodes. This can  
make it easier for your application to process the XML, but it will  
use a LOT more memory. A good DOM parser is Xerces.

SAX parsers work using an event-based system. As they encounter  
various XML elements, they will invoke call-backs for you. This can  
make your application harder to write, because you have to create a  
state machine in order to parse complicated XML documents. SAX  
parsers are faster than DOM parsers, and use a lot less memory  
(depending on how you structure your call-back functions of course).  
A very good SAX parser is Expat.

Regards, Brett

--
Brett Hutley
mailto:brett () hutley net
http://hutley.net/brett/





_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: