Learn R Programming

XML (version 3.1-1)

Doctype: Constructor for DTD reference

Description

This is a constructor for the Doctype class that can be provided at the top of an XML document to provide information about the class of document, i.e. its DTD or schema. Also, there is a method for converting such a Doctype object to a character string.

Usage

Doctype(system = character(), public = character(), name = "")

Arguments

Value

  • An object of class Doctype.

References

http://www.w3.org/XML XML Elements of Style, Simon St. Laurent.

See Also

saveXML

Examples

Run this code
d = Doctype(name = "section", public = c("-//OASIS//DTD DocBook XML V4.2//EN", "http://oasis-open.org/docbook/xml/4.2/docbookx.dtd"))
  as(d, "character")

   # this call switches the system to the URI associated with the PUBLIC element.
  d = Doctype(name = "section", public = c("-//OASIS//DTD DocBook XML V4.2//EN"), system = "http://oasis-open.org/docbook/xml/4.2/docbookx.dtd")

Run the code above in your browser using DataLab