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 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:

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

SEE ALSO:

, , ,

EXAMPLES:

 dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
 foo.dtd <- parseDTD(dtdFile)

  # Look for entities.
 xmlContainsEntity("foobar", foo.dtd)
 xmlContainsEntity("img", foo.dtd)
  # try one that isn't there
 xmlContainsEntity("nothere", foo.dtd)

  # Now look for an element
 xmlContainsElement("record", foo.dtd)