
Last chance! 50% off unlimited learning
Sale ends in
This is used to create simple document type definitions. If you need to
create a more complicated definition with internal subsets it is recommended
to parse a string directly with read_xml()
.
xml_dtd(name = "", external_id = "", system_id = "")
The name of the declaration
The external ID of the declaration
The system ID of the declaration
r <- xml_new_root(
xml_dtd(
"html",
"-//W3C//DTD XHTML 1.0 Transitional//EN",
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
)
)
# Use read_xml directly for more complicated DTD
d <- read_xml(
'
]>
This is a valid document &foo; !'
)
Run the code above in your browser using DataLab