
Last chance! 50% off unlimited learning
Sale ends in
This function is intended to be a convenience for finding all the errors in an XML or HTML document due to being malformed, i.e. missing quotes on attributes, non-terminated elements/nodes, incorrectly terminated nodes, missing entities, etc. The document is parsed and a list of the errors is returned along with information about the file, line and column number.
getXMLErrors(filename, parse = xmlParse, ...)
the identifier for the document to be parsed, one of a local file name, a URL or the XML/HTML content itself
the function to use to parse the document, usually
either xmlTreeParse
or htmlTreeParse
.
additional arguments passed to the function given by parse
A list of S3-style XMLError
objects.
libxml2 (http://xmlsoft.org)
error
argument for xmlTreeParse
and related functions.
# NOT RUN {
# Get the "errors" in the HTML that was generated from this Rd file
getXMLErrors(system.file("html", "getXMLErrors.html", package = "XML"))
# }
# NOT RUN {
getXMLErrors("http://www.omegahat.net/index.html")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab