XMLDocumentType
internal protocol XMLDocumentType : Node
-
HTML content of the document. May be
nilif no content is available.Declaration
Swift
public final var html: String? -
XML content of the document. May be
nilif no content is available.Declaration
Swift
public final var xml: String? -
Text content of the document. May be
nilif no content is available.Declaration
Swift
public final var text: String? -
HTML content of the document without the root tag. Only available if the
htmlproperty is notnil.Declaration
Swift
public final var innerHTML: String? -
Value of the attribute
class
of the root node. This property isnilif 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 tonildoes not make any change.Declaration
Swift
public final var tagName: String? -
Content of the document. May be
nilif 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]?) -> XPathResultParameters
xpathXPath to search by.
namespacesXML namespace to search in. Default value is
nil.Return Value
XPathResultenum 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]?) -> XPathResultParameters
selectorCSS selector to search by.
namespacesXML namespace to search in. Default value is
nil.Return Value
XPathResultenum case with an associated value.
XMLDocumentType Extension Reference