Class: ROXML::XML::Parser
- Inherits:
-
Object
- Object
- ROXML::XML::Parser
- Defined in:
- lib/roxml/xml/parsers/rexml.rb,
lib/roxml/xml/parsers/libxml.rb
Constant Summary collapse
- ParseError =
REXML::ParseException
Class Method Summary collapse
- .parse(str_data) ⇒ Object
-
.parse_file(path) ⇒ Object
:nodoc:.
-
.parse_io(stream) ⇒ Object
:nodoc:.
- .register_error_handler(&block) ⇒ Object
Class Method Details
.parse(str_data) ⇒ Object
49 50 51 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 49 def parse(source) REXML::Document.new(source, :ignore_whitespace_nodes => :all) end |
.parse_file(path) ⇒ Object
:nodoc:
53 54 55 56 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 53 def parse_file(path) #:nodoc: path = path.sub('file:', '') if path.starts_with?('file:') parse(open(path)) end |
.parse_io(stream) ⇒ Object
:nodoc:
58 59 60 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 58 def parse_io(path) #:nodoc: parse(path) end |
.register_error_handler(&block) ⇒ Object
62 63 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 62 def register_error_handler(&block) end |