init(data:options:)
Initializes and returns an NSXMLDTD object created from the DTD declarations encapsulated in an Nsdata object
Declaration
init(data: Data, options mask: XMLNode.Options = []) throwsParameters
- data:
A data object containing DTD declarations.
- mask:
A bit mask specifying input options; bit-OR multiple options. The current valid options are
NSXMLNodePreserveWhitespaceandNSXMLNodePreserveEntities; these constants are described in the “Constants” section of the Xmlnode reference.
Return Value
An initialized NSXMLDTD object or nil if initialization fails because of parsing errors or other reasons.
Discussion
This method is the designated initializer for the NSXMLDTD class. You use this method to create a stand-alone DTD which you can thereafter query and use for validation. You can associate the DTD created through this message with a document by setting the dtd property on an XMLDocument object.