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.
| Member | Signature |
|---|---|
kind | kind(): Core\Xml\Node::Kind |
name | name(): tainted string |
namespaceUri | namespaceUri(): ?tainted string |
text | text(): tainted string |
attributes | attributes(): array<tainted string> |
children | children(): array<Core\Xml\Node> |
source | source(): tainted string |
Enums
KindThe kind of a node in a parsed document. There are exactly five kinds.Core\Xml::parse,Core\Html::parseandCore\Xml\Readerall return nodes of these kinds, so code that checks the kind works the same with each of them.
