Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xmlContainsEntity

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

name

The name of the element or entity being queried.

dtd

The DTD in which to search for the entry.

Details

See 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.

Author(s)

Duncan Temple Lang

References

See Also

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)

XML

Tools for Parsing and Generating XML Within R and S-Plus

v3.99-0.10
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>), Tomas Kalibera [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.