File: xmlElementSummary.Rd

package info (click to toggle)
r-cran-xml 3.99-0.18-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,688 kB
  • sloc: ansic: 6,656; xml: 2,890; asm: 486; sh: 12; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,528 bytes parent folder | download | duplicates (9)
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
46
\name{xmlElementSummary}
\alias{xmlElementSummary}
\title{Frequency table of names of elements and attributes in XML content}
\description{
  This function is used to get an understanding of the use
  of element and attribute names in an XML document.
  It uses a collection of handler functions to gather 
  the information via a SAX-style parser.  
  The distribution of attribute names is done within each
  "type" of element (i.e. element name)
}
\usage{
xmlElementSummary(url, handlers = xmlElementSummaryHandlers(url))
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{url}{the source of the XML content, e.g. a file, a URL,  a
  compressed file, or a character string}
  \item{handlers}{the list of handler functions used to collect the
   information. These are passed to the function
   \code{\link{xmlEventParse}}
   as the value for the \code{handlers} parameter.
}
}
\value{
A list with two elements
 \item{nodeCounts}{a named vector of counts where the names are the
 (XML namespace qualified) element names in the XML content}
 \item{attributes}{a list with as many elements as there are elements
 in the \code{nodeCounts} element of the result. Each element of this
 sub-list gives the frequency counts for the different attributes seen within
 the XML elements with that name.}
}

\author{Duncan Temple Lang}

\seealso{
 \code{\link{xmlEventParse}}
}
\examples{
  xmlElementSummary(system.file("exampleData", "eurofxref-hist.xml.gz", package = "XML"))
}

\keyword{IO}
\concept{XML}