Class: XSD::XMLParser::NokoDocHandler

Inherits:
Nokogiri::XML::SAX::Document
  • Object
show all
Defined in:
lib/xsd/xmlparser/nokogiriparser.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner) ⇒ NokoDocHandler

Returns a new instance of NokoDocHandler.


32
33
34
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 32

def initialize(owner)
  @owner = (owner)
end

Instance Method Details

#cdata_block(t) ⇒ Object


48
49
50
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 48

def cdata_block(t)
  @owner.characters(t)
end

#characters(t) ⇒ Object


52
53
54
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 52

def characters(t)
  @owner.characters(t)
end

#comment(t) ⇒ Object


56
57
58
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 56

def comment(t)
  @owner.characters(t)
end

#end_element(name) ⇒ Object


44
45
46
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 44

def end_element(name)
  @owner.end_element(name)
end

#start_element(name, attrs) ⇒ Object


40
41
42
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 40

def start_element(name,attrs)
  @owner.start_element(name,Hash[*attrs.flatten])
end

#xmldecl(version, encoding, standalone) ⇒ Object


36
37
38
# File 'lib/xsd/xmlparser/nokogiriparser.rb', line 36

def xmldecl(version, encoding, standalone)
  @owner.xmldecl_encoding= encoding
end