Skip to content

Core\Xml\Node

One node of a document tree. Core\Xml::parse and Core\Html::parse return the document node, and you reach the other nodes through children. A node is an element, a text, a comment, a processing instruction or the document itself, and kind tells you which. Every string you read from a node is tainted, because it came from outside the program.

Returned by

You get a Core\Xml\Node from these methods:

Members

7 members.

MemberSignature
kindkind(): Core\Xml\Node::Kind
namename(): tainted string
namespaceUrinamespaceUri(): ?tainted string
texttext(): tainted string
attributesattributes(): array<tainted string>
childrenchildren(): array<Core\Xml\Node>
sourcesource(): tainted string

Enums

  • KindThe kind of a node in a parsed document. There are exactly five kinds. Core\Xml::parse, Core\Html::parse and Core\Xml\Reader all return nodes of these kinds, so code that checks the kind works the same with each of them.