Method: Nmap::XML.parse

Defined in:
lib/nmap/xml.rb

.parse(text) {|xml| ... } ⇒ Object

Creates a new XML object from XML text.

Parameters:

  • text (String)

    XML text of the scan file

Yields:

  • (xml)

    If a block is given, it will be passed the new XML object.

Yield Parameters:

  • xml (XML)

    The newly created XML object.

Since:

  • 0.8.0



69
70
71
# File 'lib/nmap/xml.rb', line 69

def self.parse(text,&block)
  new(Nokogiri::XML(text),&block)
end