xmlContainsEntity

0th

Percentile

Checks if an entity is defined within a DTD.

A DTD contains entity and element definitions. These functions test whether a DTD contains a definition for a particular named element or entity.

Keywords
file
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.

References

http://www.w3.org/XML, http://www.jclark.com/xml, http://www.omegahat.net

See Also

parseDTD, dtdEntity, dtdElement,

Aliases
  • xmlContainsEntity
  • xmlContainsElement
Examples
# NOT RUN {
 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)
# }
Documentation reproduced from package XML, version 3.98-1.19, License: BSD_2_clause + file LICENSE

Community examples

Looks like there are no examples yet.