| dtdValidElement {XML} | R Documentation |
Determines whether an XML tag is valid within another.
Description
This tests whether name is a legitimate tag
to use as a direct sub-element of the within tag
according to the definition of the within
element in the specified DTD.
Since parseDTD no longer works, this function isn't
expected to work either and will be removed in a future version of
XML.
Usage
dtdValidElement(name, within, dtd, pos=NULL)
Arguments
name |
The name of the tag which is to be inserted inside the
|
within |
The name of the parent tag the definition of which we are checking
to determine if it contains |
dtd |
The DTD in which the elements |
pos |
An optional position at which we might add the
|
Details
This applies to direct sub-elements
or children of the within tag and not tags nested
within children of that tag, i.e. descendants.
Value
Returns a logical value.
TRUE indicates that a name element
can be used inside a within element.
FALSE indicates that it cannot.
Author(s)
Duncan Temple Lang
References
https://www.w3.org/XML/, http://www.jclark.com/xml/, https://www.omegahat.net
See Also
parseDTD,
dtdElement,
dtdElementValidEntry,
Examples
dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
foo.dtd <- parseDTD(dtdFile)