Class: 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
45 46 47 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 45 def parse(source) REXML::Document.new(source, :ignore_whitespace_nodes => :all) end |
.parse_file(path) ⇒ Object
:nodoc:
49 50 51 52 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 49 def parse_file(path) #:nodoc: path = path.sub('file:', '') if path.starts_with?('file:') parse(open(path)) end |
.parse_io(stream) ⇒ Object
:nodoc:
54 55 56 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 54 def parse_io(path) #:nodoc: parse(path) end |
.register_error_handler(&block) ⇒ Object
58 59 |
# File 'lib/roxml/xml/parsers/rexml.rb', line 58 def register_error_handler(&block) end |