Checks if an entity is defined within a DTD.
xmlContainsEntity.RdA DTD contains entity and element definitions. These functions test whether a DTD contains a definition for a particular named element or entity.
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.
Examples
dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
foo.dtd <- parseDTD(dtdFile)
#> Warning: 'parseDTD' no longer works, sorry.
# Look for entities.
xmlContainsEntity("foo", foo.dtd)
#> Warning: 'xmlContainsEntity' is deprecated and will be removed soon. Please contact maintainer('XML') if you would like it to keep working.
#> [1] FALSE
xmlContainsEntity("bar", foo.dtd)
#> Warning: 'xmlContainsEntity' is deprecated and will be removed soon. Please contact maintainer('XML') if you would like it to keep working.
#> [1] FALSE
# Now look for an element
xmlContainsElement("record", foo.dtd)
#> Warning: 'xmlContainsElement' is deprecated and will be removed soon. Please contact maintainer('XML') if you would like it to keep working.
#> [1] FALSE