The XML::SyntaxError
is raised on parse errors
This class provides information about XML
SyntaxErrors. These exceptions are typically stored on Nokogiri::XML::Document#errors
.
# File lib/nokogiri/xml/syntax_error.rb, line 32 def error? level == 2 end
return true if this is an error
# File lib/nokogiri/xml/syntax_error.rb, line 38 def fatal? level == 3 end
return true if this error is fatal
# File lib/nokogiri/xml/syntax_error.rb, line 20 def none? level == 0 end
return true if this is a non error
# File lib/nokogiri/xml/syntax_error.rb, line 42 def to_s message = super.chomp [location_to_s, level_to_s, message]. compact.join(": "). force_encoding(message.encoding) end
# File lib/nokogiri/xml/syntax_error.rb, line 26 def warning? level == 1 end
return true if this is a warning
© 2008–2018 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo,
Patrick Mahoney, Yoko Harada, Akinori MUSHA, John Shahid, Lars Kanis
Licensed under the MIT License.