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

xml_dtd

Construct a document type definition


Description

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().

Usage

xml_dtd(name = "", external_id = "", system_id = "")

Arguments

name

The name of the declaration

external_id

The external ID of the declaration

system_id

The system ID of the declaration

Examples

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(
'<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY foo " test ">
]>
<doc>This is a valid document &foo; !</doc>')

xml2

Parse XML

v1.3.2
GPL (>= 2)
Authors
Hadley Wickham [aut], Jim Hester [aut, cre], Jeroen Ooms [aut], RStudio [cph], R Foundation [ctb] (Copy of R-project homepage cached as example)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.