apersaud/Nmap-Parser — pull request #5 by bonsaiviking (2012-08-02 17:21:30+00:00)
Title: Fixes issue #4 (Nmap XML format changed)

From the Nmap changelog:

o In XML output, "osclass" elements are now child elements of the
"osmatch" they belong to. Old output was thus (we're using square
brackets instead of angle brackets in this CHANGELOG entry to avoid
html escaping problems:
[os][osclass/][osclass/]...[osmatch/][osmatch/]...[/os]
New output is:
[os][osmatch][osclass/][osclass/]...[/osmatch]...[/os]
The option --deprecated-xml-osclass restores the old output, in case
you use an Nmap XML parser that doesn't understand the new
structure. The xmloutputversion has been increased to 1.04.

This commit can handle both new and old formats, and does not change the Nmap-Parser API at all.