XMLDocument
final class XMLDocument extends Document (View source)
Represents an XML document.
Constants
| DOCUMENT_POSITION_DISCONNECTED |
|
| DOCUMENT_POSITION_PRECEDING |
|
| DOCUMENT_POSITION_FOLLOWING |
|
| DOCUMENT_POSITION_CONTAINS |
|
| DOCUMENT_POSITION_CONTAINED_BY |
|
| DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC |
|
Properties
| int | $nodeType | from Node | |
| string | $nodeName | from Node | |
| string | $baseURI | from Node | |
| bool | $isConnected | from Node | |
| Document|null | $ownerDocument | from Node | |
| Node|null | $parentNode | from Node | |
| Element|null | $parentElement | from Node | |
| Node> | $childNodes | from Node | |
| Node|null | $firstChild | from Node | |
| Node|null | $lastChild | from Node | |
| Node|null | $previousSibling | from Node | |
| Node|null | $nextSibling | from Node | |
| string|null | $nodeValue | from Node | |
| string|null | $textContent | from Node | |
| Implementation read-only | $implementation | from Document | |
| string | $URL | from Document | |
| string | $documentURI | from Document | |
| string | $characterSet | from Document | |
| string | $charset | from Document | |
| string | $inputEncoding | from Document | |
| DocumentType|null | $doctype | from Document | |
| Element|null | $documentElement | from Document | |
|
HTMLCollection
Since: 8.5
|
$children | from Document | |
| Element|null | $firstElementChild | from Document | |
| Element|null | $lastElementChild | from Document | |
| int | $childElementCount | from Document | |
| HTMLElement|null | $body | from Document | |
| HTMLElement|null | $head | from Document | |
| string | $title | from Document | |
| string | $xmlEncoding | ||
| bool | $xmlStandalone | ||
| string | $xmlVersion | ||
| bool | $formatOutput |
Methods
No description
No description
No description
No description
Returns the first element that matches the CSS selectors
No description
No description
No description
No description
No description
No description
No description
Details
in
Node at line 423
Node
getRootNode(array $options = [])
No description
in
Node at line 427
bool
hasChildNodes()
No description
in
Node at line 438
void
normalize()
No description
in
Node at line 440
Node
cloneNode(bool $deep = false)
No description
in
Node at line 442
bool
isEqualNode(Node|null $otherNode)
No description
in
Node at line 444
bool
isSameNode(Node|null $otherNode)
No description
in
Node at line 452
int
compareDocumentPosition(Node $other)
No description
in
Node at line 454
bool
contains(Node|null $other)
No description
in
Node at line 456
string|null
lookupPrefix(string|null $namespace)
No description
in
Node at line 458
string|null
lookupNamespaceURI(string|null $prefix)
No description
in
Node at line 460
bool
isDefaultNamespace(string|null $namespace)
No description
in
Node at line 462
Node
insertBefore(Node $node, Node|null $child)
No description
in
Node at line 464
Node
appendChild(Node $node)
No description
in
Node at line 466
Node
replaceChild(Node $node, Node $child)
No description
in
Node at line 468
Node
removeChild(Node $child)
No description
in
Node at line 470
int
getLineNo()
No description
in
Node at line 472
string
getNodePath()
No description
in
Node at line 474
string|false
C14N(bool $exclusive = false, bool $withComments = false, array|null $xpath = null, array|null $nsPrefixes = null)
No description
in
Node at line 476
int|false
C14NFile(string $uri, bool $exclusive = false, bool $withComments = false, array|null $xpath = null, array|null $nsPrefixes = null)
No description
in
Node at line 478
array
__sleep()
No description
in
Node at line 480
void
__wakeup()
No description
HTMLCollection
getElementsByTagName(string $qualifiedName)
No description
HTMLCollection
getElementsByTagNameNS(string|null $namespace, string $localName)
No description
Element
createElement(string $localName)
No description
Element
createElementNS(string|null $namespace, string $qualifiedName)
No description
DocumentFragment
createDocumentFragment()
No description
Text
createTextNode(string $data)
No description
CDATASection
createCDATASection(string $data)
No description
Comment
createComment(string $data)
No description
ProcessingInstruction
createProcessingInstruction(string $target, string $data)
No description
Attr
createAttribute(string $localName)
No description
Attr
createAttributeNS(string|null $namespace, string $qualifiedName)
No description
Element|null
getElementById(string $elementId)
No description
void
registerNodeClass(string $baseClass, string|null $extendedClass)
No description
bool
schemaValidate(string $filename, int $flags = 0)
No description
bool
schemaValidateSource(string $source, int $flags = 0)
No description
bool
relaxNgValidate(string $filename)
No description
bool
relaxNgValidateSource(string $source)
No description
void
append(Node|string ...$nodes)
Appends nodes after the last child node
Appends one or many nodes to the list of children after the last child node.
void
prepend(Node|string ...$nodes)
Prepends nodes before the first child node
Prepends one or many nodes to the list of children before the first child node.
void
replaceChildren(Node|string ...$nodes)
Replace children in node
Element|null
querySelector(string $selectors)
Returns the first element that matches the CSS selectors
Returns the first element that matches the CSS selectors specified in selectors.
NodeList
querySelectorAll(string $selectors)
No description
HTMLCollection
getElementsByClassName(string $classNames)
No description
static XMLDocument
createEmpty(string $version = "1.0", string $encoding = "UTF-8")
No description
static XMLDocument
createFromFile(string $path, int $options = 0, string|null $overrideEncoding = null)
No description
static XMLDocument
createFromString(string $source, int $options = 0, string|null $overrideEncoding = null)
No description
EntityReference
createEntityReference(string $name)
No description
bool
validate()
No description
int
xinclude(int $options = 0)
No description
string|false
saveXml(Node|null $node = null, int $options = 0)
No description
int|false
saveXmlFile(string $filename, int $options = 0)
No description