Initializer

init(rootElement:)

Returns an NSXMLDocument object initialized with a single child, the root element.

Declaration

init(rootElement element: XMLElement?)

Parameters

root

An XMLElement object representing an XML element.

Return Value

An initialized NSXMLDocument object, or nil if initialization fails for any reason.

See Also

Initializing NSXMLDocument Objects

init(contentsOf: URL, options: XMLNode.Options)

Initializes and returns an NSXMLDocument object created from the XML or HTML contents of a URL-referenced source

init(data: Data, options: XMLNode.Options)

Initializes and returns an NSXMLDocument object created from an NSData object.

init(xmlString: String, options: XMLNode.Options)

Initializes and returns an NSXMLDocument object created from a string containing XML markup text.

class func replacementClass(for: AnyClass) -> AnyClass

Overridden by subclasses to substitute a custom class for an NSXML class that the parser uses to create node instances.