File: xmlSize.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 (42 lines) | stat: -rw-r--r-- 1,036 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
\name{xmlSize}
\alias{xmlSize}
\alias{xmlSize.default}
\alias{xmlSize.XMLDocument}
\alias{xmlSize.XMLNode}
\title{The number of sub-elements within an XML node.}
\description{
  XML elements can contain other, nested sub-elements.
 This generic function determines the number of
such elements within a specified node.
It applies to an object of class XMLNode or XMLDocument.
}
\usage{
xmlSize(obj)
}
\arguments{
  \item{obj}{ An an object of class XMLNode
or XMLDocument.}
}
\value{
 an integer which is the \code{\link{length}}
 of the value from \code{\link{xmlChildren}}.
}
\references{\url{https://www.w3.org/XML/}, \url{http://www.jclark.com/xml/},
\url{https://www.omegahat.net}  }
\author{ Duncan Temple Lang }

\seealso{
\code{\link{xmlChildren}},
\code{\link{xmlAttrs}},
\code{\link{xmlName}},
\code{\link{xmlTreeParse}}
}

\examples{
  fileName <- system.file("exampleData", "mtcars.xml", package="XML") 
  doc <- xmlTreeParse(fileName)
  xmlSize(doc)
  xmlSize(doc$doc$children[["dataset"]][["variables"]])
}
\keyword{file}