Class: XSD::XMLParser::REXMLParser

Inherits:
Parser show all
Includes:
REXML::StreamListener
Defined in:
lib/xsd/xmlparser/rexmlparser.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

#cdata(content) ⇒ Object



41
42
43
# File 'lib/xsd/xmlparser/rexmlparser.rb', line 41

def cdata(content)
  characters(content)
end

#do_parse(string_or_readable) ⇒ Object



21
22
23
24
# File 'lib/xsd/xmlparser/rexmlparser.rb', line 21

def do_parse(string_or_readable)
  $stderr.puts "XSD::XMLParser::REXMLParser.do_parse" if $DEBUG    
  REXML::Document.parse_stream(string_or_readable, self)
end

#epilogueObject



26
27
# File 'lib/xsd/xmlparser/rexmlparser.rb', line 26

def epilogue
end

#tag_end(name) ⇒ Object



33
34
35
# File 'lib/xsd/xmlparser/rexmlparser.rb', line 33

def tag_end(name)
  end_element(name)
end

#tag_start(name, attrs) ⇒ Object



29
30
31
# File 'lib/xsd/xmlparser/rexmlparser.rb', line 29

def tag_start(name, attrs)
  start_element(name, attrs)
end

#text(text) ⇒ Object



37
38
39
# File 'lib/xsd/xmlparser/rexmlparser.rb', line 37

def text(text)
  characters(text)
end

#xmldecl(version, encoding, standalone) ⇒ Object



45
46
47
# File 'lib/xsd/xmlparser/rexmlparser.rb', line 45

def xmldecl(version, encoding, standalone)
  send :xmldecl_encoding=, encoding
end