Nmap Development mailing list archives
RE: XML Questions
From: "Stou Sandalski" <tangui () cell2000 net>
Date: Thu, 17 Aug 2000 01:17:47 -0700
Ok as far as I know, there are two (standard) APIs for parsing XML documents DOM and SAX, DOM basicaly takes the whole document and builds a tree from it, its nice and all but takes a lot of memory and I am pretty sure it needs the whole document. SAX on the other hand gives you events, ie start of document, start of node this end of node that... so on etc... from this I can conclude that you don't need to have the whole document to be using it.... http://www.megginson.com/SAX/ has some useful info. However (kinda common sense), all the information tags xcept statistics should be at the beggining so a program can read them immediatly. Besides I think that (I am like 99% sure), that an XML document must have one root node. I am thinking if there is a way to add progress indication... but I can't think of anything hehehe. So I guess you should just leave the structure the way it is, and people should just chose a SAX or DOM based parser to use in their app., or some type of custom home grown dealie (which I really seee no reason for). If you think about it, a web-based view of an nmap scan will need the whole file so as to add footers and nice formating and such (use transforms on it) and so a DOM parser would be the thing to use. Where an application like a client for X needs the info as its coming. Last thought, what kind of debug output (like sent this syn packet, got that packet, etc.) does nmap support and is there any use for making XML tags for that output? Stou
-----Original Message----- From: Fyodor [mailto:fyodor () insecure org] Sent: Wednesday, August 16, 2000 22:20 To: nmap-dev () insecure org Subject: XML Questions Regarding the sample output I sent ... Will most XML tools allow "streaming" input (eg they can process each <host> ... </host> entity as they come even though everything is in an <nmaprun> ... </nmaprun> top level tag. Or should I avoid top level tags to ensure that programs can parse Nmap output "on the fly" using commonly available XML libraries/tools? Obviously Nmap can take an extended perios to run and tools should be able to process each host as it is scanned. Cheers, -F
--------------------------------------------------------------------- For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).
Current thread:
- XML Questions Fyodor (Aug 16)
- RE: XML Questions Stou Sandalski (Aug 17)
- RE: XML Questions Jay Freeman (saurik) (Aug 27)
- RE: XML Questions Fyodor (Aug 27)
- RE: XML Questions Jay Freeman (saurik) (Aug 27)
- RE: XML Questions (and stuff) Stou Sandalski (Aug 28)
- RE: XML Questions Jay Freeman (saurik) (Aug 27)
- RE: XML Questions Stou Sandalski (Aug 17)