Learn R Programming

XML (version 3.1-1)

getXMLErrors: Get XML/HTML document parse errors

Description

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.

Usage

getXMLErrors(filename, parse = xmlParse, ...)

Arguments

Value

  • A list of S3-style XMLError objects.

References

libxml2 (http://xmlsoft.org)

See Also

error argument for xmlTreeParse and related functions.

Examples

Run this code
# Get the "errors" in the HTML that was generated from this Rd file
  getXMLErrors(system.file("html", "getXMLErrors.html", package = "XML"))

getXMLErrors("http://www.omegahat.org/index.html")

Run the code above in your browser using DataLab