XMLDocumentType
internal protocol XMLDocumentType : Node
-
HTML content of the document. May be
nil
if no content is available.Declaration
Swift
public final var html: String?
-
XML content of the document. May be
nil
if no content is available.Declaration
Swift
public final var xml: String?
-
Text content of the document. May be
nil
if no content is available.Declaration
Swift
public final var text: String?
-
HTML content of the document without the root tag. Only available if the
html
property is notnil
.Declaration
Swift
public final var innerHTML: String?
-
Value of the attribute
class
of the root node. This property isnil
if the node does not have aclass
attributeDeclaration
Swift
public final var className: String?
-
Name of the tag for the root node.
Note
Setting this property tonil
does not make any change.Declaration
Swift
public final var tagName: String?
-
Content of the document. May be
nil
if no content is available.Declaration
Swift
public final var content: String?
-
Searches for a node from a root node by provided XPath.
Declaration
Swift
public final func search(byXPath xpath: String, namespaces: [String : String]?) -> XPathResult
Parameters
xpath
XPath to search by.
namespaces
XML namespace to search in. Default value is
nil
.Return Value
XPathResult
enum case with an associated value. -
Searches for a node from a root node by provided CSS selector.
Declaration
Swift
public final func search(byCSSSelector selector: String, namespaces: [String : String]?) -> XPathResult
Parameters
selector
CSS selector to search by.
namespaces
XML namespace to search in. Default value is
nil
.Return Value
XPathResult
enum case with an associated value.