File: toString.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 (43 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download | duplicates (2)
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
\name{toString.XMLNode}
\alias{toString.XMLNode}
\title{Creates string representation of XML node}
\description{
  This creates a string from a hierarchical XML node and its children
  just as it prints on the console or one might see it in
  a document.
}
\usage{
\method{toString}{XMLNode}(x, ...)
}
\arguments{
  \item{x}{an object of class \code{XMLNode}.}
  \item{\dots}{currently ignored}
}
\details{
  This uses a textConnection object using the name
  .tempXMLOutput. Since this is global, it will overwrite
  any existing object of that name! As a result, this
  function cannot be used recursively in its present form.
}
\value{
  A character vector with one element, that being the
  string corresponding to the XML node's contents.
}

\references{\url{https://www.w3.org/XML/}, \url{http://www.jclark.com/xml/}}
\author{Duncan Temple Lang}
\note{ This requires the Expat XML parser to be installed. }


\seealso{
  \code{\link{xmlNode}}
  \code{\link{xmlTreeParse}}
}

\examples{
 x <- xmlRoot(xmlTreeParse(system.file("exampleData", "gnumeric.xml", package = "XML")))

 toString(x)
}
\keyword{file}