php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
DOMDocument Class Reference
Inheritance diagram for DOMDocument:
DOMNode DOMParentNode

Public Member Functions

 __construct (string $version="1.0", string $encoding="")
 
 createAttribute (string $localName)
 
 createAttributeNS (?string $namespace, string $qualifiedName)
 
 createCDATASection (string $data)
 
 createComment (string $data)
 
 createDocumentFragment ()
 
 createElement (string $localName, string $value="")
 
 createElementNS (?string $namespace, string $qualifiedName, string $value="")
 
 createEntityReference (string $name)
 
 createProcessingInstruction (string $target, string $data="")
 
 createTextNode (string $data)
 
 getElementById (string $elementId)
 
 getElementsByTagName (string $qualifiedName)
 
 getElementsByTagNameNS (?string $namespace, string $localName)
 
 importNode (DOMNode $node, bool $deep=false)
 
 load (string $filename, int $options=0)
 
 loadXML (string $source, int $options=0)
 
 normalizeDocument ()
 
 registerNodeClass (string $baseClass, ?string $extendedClass)
 
 save (string $filename, int $options=0)
 
 loadHTML (string $source, int $options=0)
 
 loadHTMLFile (string $filename, int $options=0)
 
 saveHTML (?DOMNode $node=null)
 
 saveHTMLFile (string $filename)
 
 saveXML (?DOMNode $node=null, int $options=0)
 
 schemaValidate (string $filename, int $flags=0)
 
 schemaValidateSource (string $source, int $flags=0)
 
 relaxNGValidate (string $filename)
 
 relaxNGValidateSource (string $source)
 
 validate ()
 
 xinclude (int $options=0)
 
 adoptNode (DOMNode $node)
 
 append (... $nodes)
 
 prepend (... $nodes)
 
 replaceChildren (... $nodes)
 
- Public Member Functions inherited from DOMNode
 appendChild (DOMNode $node)
 
 C14N (bool $exclusive=false, bool $withComments=false, ?array $xpath=null, ?array $nsPrefixes=null)
 
 C14NFile (string $uri, bool $exclusive=false, bool $withComments=false, ?array $xpath=null, ?array $nsPrefixes=null)
 
 cloneNode (bool $deep=false)
 
 getLineNo ()
 
 getNodePath ()
 
 hasAttributes ()
 
 hasChildNodes ()
 
 insertBefore (DOMNode $node, ?DOMNode $child=null)
 
 isDefaultNamespace (string $namespace)
 
 isSameNode (DOMNode $otherNode)
 
 isEqualNode (?DOMNode $otherNode)
 
 isSupported (string $feature, string $version)
 
 lookupNamespaceURI (?string $prefix)
 
 lookupPrefix (string $namespace)
 
 normalize ()
 
 removeChild (DOMNode $child)
 
 replaceChild (DOMNode $node, DOMNode $child)
 
 contains (DOMNode|DOMNameSpaceNode|null $other)
 
 getRootNode (?array $options=null)
 
 compareDocumentPosition (DOMNode $other)
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

DOMDocumentType $doctype
 
DOMImplementation $implementation
 
DOMElement $documentElement
 
string $actualEncoding
 
string $encoding
 
string $xmlEncoding
 
bool $standalone
 
bool $xmlStandalone
 
string $version
 
string $xmlVersion
 
bool $strictErrorChecking
 
string $documentURI
 
mixed $config
 
bool $formatOutput
 
bool $validateOnParse
 
bool $resolveExternals
 
bool $preserveWhiteSpace
 
bool $recover
 
bool $substituteEntities
 
DOMElement $firstElementChild
 
DOMElement $lastElementChild
 
int $childElementCount
 
- Data Fields inherited from DOMNode
const int DOCUMENT_POSITION_DISCONNECTED = 0x01
 
const int DOCUMENT_POSITION_PRECEDING = 0x02
 
const int DOCUMENT_POSITION_FOLLOWING = 0x04
 
const int DOCUMENT_POSITION_CONTAINS = 0x08
 
const int DOCUMENT_POSITION_CONTAINED_BY = 0x10
 
const int DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
 
string $nodeName
 
string $nodeValue
 
int $nodeType
 
DOMNode $parentNode
 
DOMElement $parentElement
 
DOMNodeList $childNodes
 
DOMNode $firstChild
 
DOMNode $lastChild
 
DOMNode $previousSibling
 
DOMNode $nextSibling
 
DOMNamedNodeMap $attributes
 
bool $isConnected
 
DOMDocument $ownerDocument
 
string $namespaceURI
 
string $prefix
 
string $localName
 
string $baseURI
 
string $textContent
 

Detailed Description

Definition at line 853 of file php_dom.stub.php.

Constructor & Destructor Documentation

◆ __construct()

DOMDocument::__construct ( string $version = "1.0",
string $encoding = "" )

Definition at line 950 of file php_dom.stub.php.

Member Function Documentation

◆ adoptNode()

DOMDocument::adoptNode ( DOMNode $node)

@tentative-return-type

Definition at line 1053 of file php_dom.stub.php.

◆ append()

DOMDocument::append ( ...)
Parameters
DOMNode | string$nodes@implementation-alias DOMElement\append

Implements DOMParentNode.

Definition at line 1059 of file php_dom.stub.php.

◆ createAttribute()

DOMDocument::createAttribute ( string $localName)
Returns
DOMAttr|false

Definition at line 953 of file php_dom.stub.php.

◆ createAttributeNS()

DOMDocument::createAttributeNS ( ?string $namespace,
string $qualifiedName )
Returns
DOMAttr|false

Definition at line 956 of file php_dom.stub.php.

◆ createCDATASection()

DOMDocument::createCDATASection ( string $data)
Returns
DOMCdataSection|false

Definition at line 959 of file php_dom.stub.php.

◆ createComment()

DOMDocument::createComment ( string $data)

@tentative-return-type

Definition at line 962 of file php_dom.stub.php.

◆ createDocumentFragment()

DOMDocument::createDocumentFragment ( )

@tentative-return-type

Definition at line 965 of file php_dom.stub.php.

◆ createElement()

DOMDocument::createElement ( string $localName,
string $value = "" )
Returns
DOMElement|false

Definition at line 968 of file php_dom.stub.php.

◆ createElementNS()

DOMDocument::createElementNS ( ?string $namespace,
string $qualifiedName,
string $value = "" )
Returns
DOMElement|false

Definition at line 971 of file php_dom.stub.php.

◆ createEntityReference()

DOMDocument::createEntityReference ( string $name)
Returns
DOMEntityReference|false

Definition at line 974 of file php_dom.stub.php.

◆ createProcessingInstruction()

DOMDocument::createProcessingInstruction ( string $target,
string $data = "" )
Returns
DOMProcessingInstruction|false

Definition at line 977 of file php_dom.stub.php.

◆ createTextNode()

DOMDocument::createTextNode ( string $data)

@tentative-return-type

Definition at line 980 of file php_dom.stub.php.

◆ getElementById()

DOMDocument::getElementById ( string $elementId)

@tentative-return-type

Definition at line 983 of file php_dom.stub.php.

◆ getElementsByTagName()

DOMDocument::getElementsByTagName ( string $qualifiedName)

@tentative-return-type @implementation-alias DOMElement\getElementsByTagName

Definition at line 989 of file php_dom.stub.php.

◆ getElementsByTagNameNS()

DOMDocument::getElementsByTagNameNS ( ?string $namespace,
string $localName )

@tentative-return-type @implementation-alias DOMElement\getElementsByTagNameNS

Definition at line 995 of file php_dom.stub.php.

◆ importNode()

DOMDocument::importNode ( DOMNode $node,
bool $deep = false )
Returns
DOMNode|false

Definition at line 998 of file php_dom.stub.php.

◆ load()

DOMDocument::load ( string $filename,
int $options = 0 )

@tentative-return-type

Definition at line 1001 of file php_dom.stub.php.

◆ loadHTML()

DOMDocument::loadHTML ( string $source,
int $options = 0 )

@tentative-return-type

Definition at line 1017 of file php_dom.stub.php.

◆ loadHTMLFile()

DOMDocument::loadHTMLFile ( string $filename,
int $options = 0 )

@tentative-return-type

Definition at line 1020 of file php_dom.stub.php.

◆ loadXML()

DOMDocument::loadXML ( string $source,
int $options = 0 )

@tentative-return-type

Definition at line 1004 of file php_dom.stub.php.

◆ normalizeDocument()

DOMDocument::normalizeDocument ( )

@tentative-return-type

Definition at line 1007 of file php_dom.stub.php.

◆ prepend()

DOMDocument::prepend ( ...)
Parameters
DOMNode | string$nodes@implementation-alias DOMElement\prepend

Implements DOMParentNode.

Definition at line 1065 of file php_dom.stub.php.

◆ registerNodeClass()

DOMDocument::registerNodeClass ( string $baseClass,
?string $extendedClass )

@tentative-return-type

Definition at line 1010 of file php_dom.stub.php.

◆ relaxNGValidate()

DOMDocument::relaxNGValidate ( string $filename)

@tentative-return-type

Definition at line 1040 of file php_dom.stub.php.

◆ relaxNGValidateSource()

DOMDocument::relaxNGValidateSource ( string $source)

@tentative-return-type

Definition at line 1043 of file php_dom.stub.php.

◆ replaceChildren()

DOMDocument::replaceChildren ( ...)
Parameters
DOMNode | string$nodes

Implements DOMParentNode.

Definition at line 1068 of file php_dom.stub.php.

◆ save()

DOMDocument::save ( string $filename,
int $options = 0 )

@tentative-return-type

Definition at line 1013 of file php_dom.stub.php.

◆ saveHTML()

DOMDocument::saveHTML ( ?DOMNode $node = null)

@tentative-return-type

Definition at line 1023 of file php_dom.stub.php.

◆ saveHTMLFile()

DOMDocument::saveHTMLFile ( string $filename)

@tentative-return-type

Definition at line 1026 of file php_dom.stub.php.

◆ saveXML()

DOMDocument::saveXML ( ?DOMNode $node = null,
int $options = 0 )

@tentative-return-type

Definition at line 1030 of file php_dom.stub.php.

◆ schemaValidate()

DOMDocument::schemaValidate ( string $filename,
int $flags = 0 )

@tentative-return-type

Definition at line 1034 of file php_dom.stub.php.

◆ schemaValidateSource()

DOMDocument::schemaValidateSource ( string $source,
int $flags = 0 )

@tentative-return-type

Definition at line 1037 of file php_dom.stub.php.

◆ validate()

DOMDocument::validate ( )

@tentative-return-type

Definition at line 1047 of file php_dom.stub.php.

◆ xinclude()

DOMDocument::xinclude ( int $options = 0)

@tentative-return-type

Definition at line 1050 of file php_dom.stub.php.

Field Documentation

◆ $actualEncoding

string DOMDocument::$actualEncoding

@readonly

Deprecated
@virtual

Definition at line 878 of file php_dom.stub.php.

◆ $childElementCount

int DOMDocument::$childElementCount

@readonly @virtual

Definition at line 948 of file php_dom.stub.php.

◆ $config

mixed DOMDocument::$config

@readonly

Deprecated
@virtual

Definition at line 912 of file php_dom.stub.php.

◆ $doctype

DOMDocumentType DOMDocument::$doctype

@readonly @virtual

Definition at line 859 of file php_dom.stub.php.

◆ $documentElement

DOMElement DOMDocument::$documentElement

@readonly @virtual

Definition at line 871 of file php_dom.stub.php.

◆ $documentURI

string DOMDocument::$documentURI

@virtual

Definition at line 905 of file php_dom.stub.php.

◆ $encoding

string DOMDocument::$encoding

@virtual

Definition at line 881 of file php_dom.stub.php.

◆ $firstElementChild

DOMElement DOMDocument::$firstElementChild

@readonly @virtual

Definition at line 936 of file php_dom.stub.php.

◆ $formatOutput

bool DOMDocument::$formatOutput

@virtual

Definition at line 915 of file php_dom.stub.php.

◆ $implementation

DOMImplementation DOMDocument::$implementation

@readonly @virtual

Definition at line 865 of file php_dom.stub.php.

◆ $lastElementChild

DOMElement DOMDocument::$lastElementChild

@readonly @virtual

Definition at line 942 of file php_dom.stub.php.

◆ $preserveWhiteSpace

bool DOMDocument::$preserveWhiteSpace

@virtual

Definition at line 924 of file php_dom.stub.php.

◆ $recover

bool DOMDocument::$recover

@virtual

Definition at line 927 of file php_dom.stub.php.

◆ $resolveExternals

bool DOMDocument::$resolveExternals

@virtual

Definition at line 921 of file php_dom.stub.php.

◆ $standalone

bool DOMDocument::$standalone

@virtual

Definition at line 890 of file php_dom.stub.php.

◆ $strictErrorChecking

bool DOMDocument::$strictErrorChecking

@virtual

Definition at line 902 of file php_dom.stub.php.

◆ $substituteEntities

bool DOMDocument::$substituteEntities

@virtual

Definition at line 930 of file php_dom.stub.php.

◆ $validateOnParse

bool DOMDocument::$validateOnParse

@virtual

Definition at line 918 of file php_dom.stub.php.

◆ $version

string DOMDocument::$version

@virtual

Definition at line 896 of file php_dom.stub.php.

◆ $xmlEncoding

string DOMDocument::$xmlEncoding

@readonly @virtual

Definition at line 887 of file php_dom.stub.php.

◆ $xmlStandalone

bool DOMDocument::$xmlStandalone

@virtual

Definition at line 893 of file php_dom.stub.php.

◆ $xmlVersion

string DOMDocument::$xmlVersion

@virtual

Definition at line 899 of file php_dom.stub.php.


The documentation for this class was generated from the following file: