Class OnePassParser

java.lang.Object
org.nmap4j.parser.OnePassParser
All Implemented Interfaces:
NMap4JParserEventListener

public class OnePassParser extends Object implements NMap4JParserEventListener
The OnePassParser takes a document and parsers it all the way through and returns a tree of Objects that represent the XML that was just parsed.

This type of parsing is best for smaller documents where the time to parse it is small and the amount of data is less. If you have a large XML document, you may want to consider using the NotifyingParser which issues an event listener model, allowing you to listen in for host objects as they are parsed.

To use this class, pass in a either a File object or an InputStream and call the parse() method. You will receive a tree of objects that contain the contents of the XML.