Class: XSD::XMLParser::REXMLParser
- Inherits:
-
Parser
show all
- Includes:
- REXML::StreamListener
- Defined in:
- lib/action_web_service/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
Instance Method Details
#do_parse(string_or_readable) ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/action_web_service/xsd/xmlparser/rexmlparser.rb', line 21
def do_parse(string_or_readable)
source = nil
source = REXML::SourceFactory.create_from(string_or_readable)
source.encoding = charset if charset
@charset = 'utf-8'
REXML::Document.parse_stream(source, self)
end
|
30
31
|
# File 'lib/action_web_service/xsd/xmlparser/rexmlparser.rb', line 30
def epilogue
end
|
#tag_end(name) ⇒ Object
37
38
39
|
# File 'lib/action_web_service/xsd/xmlparser/rexmlparser.rb', line 37
def tag_end(name)
end_element(name)
end
|
#tag_start(name, attrs) ⇒ Object
33
34
35
|
# File 'lib/action_web_service/xsd/xmlparser/rexmlparser.rb', line 33
def tag_start(name, attrs)
start_element(name, attrs)
end
|
#text(text) ⇒ Object
41
42
43
|
# File 'lib/action_web_service/xsd/xmlparser/rexmlparser.rb', line 41
def text(text)
characters(text)
end
|
#xmldecl(version, encoding, standalone) ⇒ Object
45
46
47
|
# File 'lib/action_web_service/xsd/xmlparser/rexmlparser.rb', line 45
def xmldecl(version, encoding, standalone)
end
|