Module: Ronin::Web::XML
- Defined in:
- lib/ronin/web/xml.rb
Overview
XML helper methods.
Class Method Summary collapse
-
.build { ... } ⇒ Nokogiri::XML::Builder
Creates a new
Nokogiri::XML::Builder
. -
.parse(xml) {|doc| ... } ⇒ Nokogiri::XML::Document
Parses the body of a document into a HTML document object.
Class Method Details
.build { ... } ⇒ Nokogiri::XML::Builder
Creates a new Nokogiri::XML::Builder
.
81 82 83 |
# File 'lib/ronin/web/xml.rb', line 81 def self.build(&block) Nokogiri::XML::Builder.new(&block) end |
.parse(xml) {|doc| ... } ⇒ Nokogiri::XML::Document
Parses the body of a document into a HTML document object.
51 52 53 54 55 |
# File 'lib/ronin/web/xml.rb', line 51 def self.parse(xml) doc = Nokogiri::XML.parse(xml) yield doc if block_given? return doc end |