class Nokogiri::XML::SyntaxError
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.
Attributes
code[R]
column[R]
domain[R]
file[R]
int1[R]
level[R]
line[R]
str1[R]
str2[R]
str3[R]
Public Instance Methods
# File lib/nokogiri/xml/syntax_error.rb, line 34 def error? level == 2 end
return true if this is an error
# File lib/nokogiri/xml/syntax_error.rb, line 40 def fatal? level == 3 end
return true if this error is fatal
# File lib/nokogiri/xml/syntax_error.rb, line 22 def none? level == 0 end
return true if this is a non error
# File lib/nokogiri/xml/syntax_error.rb, line 44
def to_s
message = super.chomp
[location_to_s, level_to_s, message]
.compact.join(": ")
.force_encoding(message.encoding)
end Calls superclass method
# File lib/nokogiri/xml/syntax_error.rb, line 28 def warning? level == 1 end
return true if this is a warning
© 2008–2023 by Mike Dalessio, Aaron Patterson, Yoko Harada, Akinori MUSHA, John Shahid,
Karol Bucek, Sam Ruby, Craig Barnes, Stephen Checkoway, Lars Kanis, Sergio Arbeo,
Timothy Elliott, Nobuyoshi Nakada, Charles Nutter, Patrick MahoneyLicensed under the MIT License.
https://nokogiri.org/rdoc/Nokogiri/XML/SyntaxError.html