Skip to content
Thomas Weinert edited this page Jul 12, 2018 · 3 revisions

FluentDOM provides extended versions the most DOM node classes.

Functor

Nodes can be called as functions. This will evaluate an Xpath expression in the context of the node. The following two statements are equal:

$xpath = new FluentDOM\DOM\Xpath($node->ownerDocument);
$result = $xpath->evaluate($expression, $node);

$result = $node($expression);

String Cast

Except for the FluentDOM\DOM\Document casting a node into a string will return the nodes text content. The document will return an XML string.

DOM Living Standard

FluentDOM implements parts of DOM Living Standard. The following interfaces are implemented:

  • NonElementParentNode
  • ParentNode
  • NonDocumentTypeChildNode
  • ChildNode
Clone this wiki locally