Protocols

The following protocols are available globally.

  • Instances of conforming types represent a document object model node that can be searched by an XPath or CSS selector and also provide the node’s underlying data in a number of ways.

    In the HTML/XML DOM (Document Object Model), everything is a node:

    • The document itself is a document node;

    • All HTML/XML elements are element nodes;

    • All HTML/XML attributes are attribute nodes;

    • Text inside HTML elements are text nodes;

    • Comments are comment nodes.

    See more

    Declaration

    Swift

    public protocol Node: Searchable, CustomStringConvertible
  • Instances of conforming types can use XPath or CSS selectors to form a search request.

    See more

    Declaration

    Swift

    public protocol Searchable
  • Instances of conforming types can provide a number of means to see and edit an internal structure of XML nodes.

    See more

    Declaration

    Swift

    public protocol XMLElement: Node