XMLDTD
A representation of a Document Type Definition.
Declaration
class XMLDTDOverview
An instance of the XMLDTD class is held as a property of an XMLDocument instance, accessed through the XMLDocument property dtd.
In the data model, an XMLDTD object is conceptually similar to namespace and attribute nodes: it is not considered to be a child of the XMLDocument object although it is closely associated with it. It is at the “root” of a shallow tree consisting primarily of nodes representing DTD declarations. Acceptable child nodes are instances of the XMLDTDNode class as well as XMLNode objects representing comment nodes and processing-instruction nodes.
You create an NSXMLDTD object in one of three ways:
By processing an XML document with its own internal (in-line) DTD
By process a standalone (external) DTD
Programmatically
Once an XMLDTD instance is in place, you can add, remove, and change the XMLDTDNode objects representing various DTD declarations. When you write the document out as XML, the new or modified internal DTD is included (assuming you set the DTD in the XMLDocument instance). You may also programmatically create an external DTD and write that out to its own file.
Topics
Initializing an NSXMLDTD Object
Managing DTD Identifiers
Manipulating Child Nodes
addChild(_:)insertChild(_:at:)insertChildren(_:at:)removeChild(at:)replaceChild(at:with:)setChildren(_:)
Getting DTD Nodes by Name
predefinedEntityDeclaration(forName:)elementDeclaration(forName:)attributeDeclaration(forName:elementName:)entityDeclaration(forName:)notationDeclaration(forName:)