Nmap Development mailing list archives
XML is a beautiful thing [was: How do YOU use Nmap XML?]
From: brett () custom-tech net (Brett Campbell)
Date: Fri, 19 Nov 2004 16:46:41 -0800
On Tue, Nov 16, 2004 at 04:16:15PM +0100, Nils Magnus wrote:
Although XML may be helpful at times, I have still gives me some headache. The basic syntax may be specified, but there lots of
i can't directly answer fyodor's question, so this is a response to part of the sub-thread that was forming.
unanswered questions. Example: nmap generates the following output: ... <hosts up="1" down="0" total="1" /> ... This is perfect from a syntax point of view, but why isn't it formatted as
the above naturally seems easier and more contained to me. i would much rather prefer pulling values from attributes than just plain text or whatever the latter is that follows.
<hosts>
<up>
1
</up>
<down>
0
</down>
</hosts> ?
No XML evangelist was able to help me on this issue so far.
The Perl-Parser is ok, but if you compare the amount of time to get
something useful out of an XML-parser compared to a grep over "-oM",
the XML will currently always lose.
i think xml output is one of the nicest contributions nmap has seen. i'm only beginning to work with xml and discover its advantages (i haven't yet touched nmap xml output, ironically). let me tell you, i've been deep into the days of crazy shell scripts, sed, awk, temporary files, and/or perl when parsing -oG or -oM. Dave Cheney made some good points in this thread about xml being eXtensible. it's a hell of a lot easier and more sane to maintain your scripts when parsing a potentially-changing xml output, compared to looking at some wicked one-liners in that shell script you wrote six months ago (containing undescriptive things like "cut -f3 -d'/'"). thanks, - -brett -- [ Brett R. Campbell ] -> Configuration Management / Systems Administration -> Collaborative Agent Design Research Center -> California Polytechnic State University, SLO, CA http://www.cadrc.calpoly.edu/frameset_content/content_about_us.html --------------------------------------------------------------------- For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List archive: http://seclists.org
Current thread:
- How do YOU use Nmap XML? Fyodor (Nov 15)
- Re: How do YOU use Nmap XML? Paul Johnston (Nov 16)
- Re: How do YOU use Nmap XML? Okan Demirmen (Nov 16)
- Re: How do YOU use Nmap XML? Nils Magnus (Nov 16)
- RE: How do YOU use Nmap XML? Yvan G.J. Boily (Nov 16)
- Message not available
- Re: How do YOU use Nmap XML? Nils Magnus (Nov 16)
- XML is a beautiful thing [was: How do YOU use Nmap XML?] Brett Campbell (Nov 19)
- Re: How do YOU use Nmap XML? Nils Magnus (Nov 16)
- Re: How do YOU use Nmap XML? David G. Cheney (Nov 16)
- Re: How do YOU use Nmap XML? Joshua T. Corbin (Nov 17)
- <Possible follow-ups>
- RE: How do YOU use Nmap XML? Sean Warnock (Nov 16)
