File: getXMLErrors.Rd

package info (click to toggle)
r-cran-xml 3.99-0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,688 kB
  • sloc: ansic: 6,659; xml: 2,890; asm: 486; sh: 12; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,440 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
\name{getXMLErrors}
\alias{getXMLErrors}
\title{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, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{filename}{ the identifier for the  document to be parsed, one of
  a local file name,  a URL or the XML/HTML content itself}
  \item{parse}{ the function to use to parse the document, usually
  either  \code{\link{xmlTreeParse}} or  \code{\link{htmlTreeParse}}.
  }
  \item{\dots}{additional arguments passed to the function given by \code{parse}}
}
\value{
 A list of S3-style  \code{XMLError} objects.
}
\references{libxml2 (\url{http://xmlsoft.org})}
\author{Duncan Temple Lang}

\seealso{
  \code{error} argument for \code{\link{xmlTreeParse}} and related functions.
}
\examples{
     # Get the "errors" in the HTML that was generated from this Rd file
  getXMLErrors(system.file("html", "getXMLErrors.html", package = "XML"))

\dontrun{
  getXMLErrors("https://www.omegahat.net/index.html")
}

}
\keyword{IO}
\keyword{programming}