Class: XSD::XMLParser::NokogiriParser

Inherits:
Parser show all
Defined in:
lib/xsd/xmlparser/nokogiriparser.rb

Instance Attribute Summary

Attributes inherited from Parser

#charset

Instance Method Summary collapse

Methods inherited from Parser

add_factory, create_parser, factory, #initialize, #parse

Constructor Details

This class inherits a constructor from XSD::XMLParser::Parser

Instance Method Details

#do_parse(string_or_readable) ⇒ Object



15
16
17
18
19
20
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 15

def do_parse(string_or_readable)
  $stderr.puts "XSD::XMLParser::NokogiriParser.do_parse" if $DEBUG    
  handler = NokoDocHandler.new(self)
  parser = Nokogiri::XML::SAX::Parser.new(handler)    
  parser.parse(string_or_readable)
end