Learn R Programming

XML (version 1.2-0)

dtdIsAttribute: Query if a name is a valid attribute of a DTD element.

Description

Examines the definition of the DTD element definition identified by element to see if it supports an attribute named name.

Usage

dtdIsAttribute(name, element, dtd)

Arguments

Value

  • A logical value indicating if the list of attributes suppported by the specified element has an entry named name. This does indicate what type of value that attribute has, whether it is required, implied, fixed, etc.

References

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

See Also

parseDTD, dtdElement, xmlAttrs

Examples

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

    # true
  dtdIsAttribute("numRecords", "dataset", foo.dtd)

    # false
  dtdIsAttribute("date", "dataset", foo.dtd)

Run the code above in your browser using DataLab