dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
foo.dtd <- parseDTD(dtdFile)
# The following are true.
dtdValidElement("variable","variables", dtd = foo.dtd)
dtdValidElement("record","dataset", dtd = foo.dtd)
# This is false.
dtdValidElement("variable","dataset", dtd = foo.dtd)
Run the code above in your browser using DataLab