init(contentsOf:options:)
Initializes and returns an NSXMLDTD object created from the DTD declarations in a URL-referenced source.
Declaration
convenience init(contentsOf url: URL, options mask: XMLNode.Options = []) throwsParameters
Return Value
An initialized NSXMLDTD object or nil if initialization fails because of parsing errors or other reasons.
Discussion
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.
See Also
Related Documentation
validate()- Tree-Based XML Programming Guide