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

dtdElementValidEntry

Determines whether an XML element allows a particular type of sub-element.


Description

This tests whether name is a legitimate tag to use as a direct sub-element of the element tag according to the definition of the element element in the specified DTD. This is a generic function that dispatches on the element type, so that different version take effect for XMLSequenceContent, XMLOrContent, XMLElementContent.

Usage

dtdElementValidEntry(element, name, pos=NULL)

Arguments

element

The XMLElementDef defining the tag in which we are asking whether the sub-element can be used.

name

The name of the sub-element about which we are querying the list of sub-tags within element.

pos

An optional argument which, if supplied, queries whether the name sub-element is valid as the pos-th child of element.

Details

This is not intended to be called directly, but indirectly by the dtdValidElement function.

Value

Logical value indicating whether the sub-element can appear in an element tag or not.

Author(s)

Duncan Temple Lang

References

See Also

Examples

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

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.