File: xmlContainsEntity.Rd

package info (click to toggle)
r-cran-xml 3.98-1.5-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 9,464 kB
  • ctags: 636
  • sloc: xml: 79,579; ansic: 6,518; asm: 644; sh: 16; makefile: 1
file content (47 lines) | stat: -rw-r--r-- 1,231 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
46
47
\name{xmlContainsEntity}
\alias{xmlContainsEntity}
\alias{xmlContainsElement}
\title{Checks if an entity is defined within a DTD.}
\description{
A DTD contains entity and element definitions.
These functions test whether a DTD contains a definition
for a particular named element or entity.
}
\usage{
xmlContainsEntity(name, dtd)
xmlContainsElement(name, dtd)
}
\arguments{
  \item{name}{ The name of the element
or entity being queried.}
  \item{dtd}{ The DTD in which to search for the entry.}
}
\details{
 See \code{\link{parseDTD}} for more information about
DTDs, entities and elements.
}
\value{
 A logical value indicating whether the entry
was found in the appropriate list of 
entitiy or element definitions.
}
\references{\url{http://www.w3.org/XML}, \url{http://www.jclark.com/xml},
\url{http://www.omegahat.net}  }
\author{ Duncan Temple Lang }
\seealso{ \code{\link{parseDTD}},
\code{\link{dtdEntity}},
\code{\link{dtdElement}},
}

\examples{
 dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
 foo.dtd <- parseDTD(dtdFile)
 
  # Look for entities.
 xmlContainsEntity("foo", foo.dtd)
 xmlContainsEntity("bar", foo.dtd)

  # Now look for an element
 xmlContainsElement("record", foo.dtd)
}
\keyword{file}