Downloads
Documentation
Get Involved
Help
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Enumerations
Errors
Exceptions
Fibers
Generators
Attributes
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Predefined Attributes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Session Security
Filesystem Security
Database Security
Error Reporting
User Submitted Data
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Dealing with XForms
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
GUI Extensions
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
g p
Previous man page
g n
Next man page
G
Scroll to bottom
g g
Scroll to top
g h
Goto homepage
g s
Goto search
(current page)
/
Focus search box
简介 »
« XML 操作
PHP 手册
函数参考
XML 操作
Change language:
English
Chinese (Simplified)
Other
Document Object Model
简介
安装/配置
需求
安装
运行时配置
资源类型
预定义常量
示例
DOMAttr
— The DOMAttr class
DOMAttr::__construct
— Creates a new DOMAttr object
DOMAttr::isId
— Checks if attribute is a defined ID
DOMCdataSection
— The DOMCdataSection class
DOMCdataSection::__construct
— Constructs a new DOMCdataSection object
DOMCharacterData
— The DOMCharacterData class
DOMCharacterData::after
— Adds nodes after the character data
DOMCharacterData::appendData
— Append the string to the end of the character data of the node
DOMCharacterData::before
— Adds nodes before the node
DOMCharacterData::deleteData
— Remove a range of characters from the node
DOMCharacterData::insertData
— Insert a string at the specified 16-bit unit offset
DOMCharacterData::remove
— Removes the character data
DOMCharacterData::replaceData
— Replace a substring within the DOMCharacterData node
DOMCharacterData::replaceWith
— Replaces the character data with new nodes
DOMCharacterData::substringData
— Extracts a range of data from the node
DOMChildNode
— The DOMChildNode interface
DOMChildNode::after
— Adds nodes after the node
DOMChildNode::before
— Adds nodes before the node
DOMChildNode::remove
— Removes the node
DOMChildNode::replaceWith
— Replaces the node with new nodes
DOMComment
— The DOMComment class
DOMComment::__construct
— Creates a new DOMComment object
DOMDocument
— The DOMDocument class
DOMDocument::adoptNode
— Transfer a node from another document
DOMDocument::append
— Appends nodes after the last child node
DOMDocument::__construct
— Creates a new DOMDocument object
DOMDocument::createAttribute
— Create new attribute
DOMDocument::createAttributeNS
— Create new attribute node with an associated namespace
DOMDocument::createCDATASection
— Create new cdata node
DOMDocument::createComment
— Create new comment node
DOMDocument::createDocumentFragment
— Create new document fragment
DOMDocument::createElement
— Create new element node
DOMDocument::createElementNS
— Create new element node with an associated namespace
DOMDocument::createEntityReference
— Create new entity reference node
DOMDocument::createProcessingInstruction
— Creates new PI node
DOMDocument::createTextNode
— Create new text node
DOMDocument::getElementById
— Searches for an element with a certain id
DOMDocument::getElementsByTagName
— Searches for all elements with given local tag name
DOMDocument::getElementsByTagNameNS
— Searches for all elements with given tag name in specified namespace
DOMDocument::importNode
— Import node into current document
DOMDocument::load
— Load XML from a file
DOMDocument::loadHTML
— Load HTML from a string
DOMDocument::loadHTMLFile
— Load HTML from a file
DOMDocument::loadXML
— Load XML from a string
DOMDocument::normalizeDocument
— Normalizes the document
DOMDocument::prepend
— Prepends nodes before the first child node
DOMDocument::registerNodeClass
— Register extended class used to create base node type
DOMDocument::relaxNGValidate
— Performs relaxNG validation on the document
DOMDocument::relaxNGValidateSource
— Performs relaxNG validation on the document
DOMDocument::replaceChildren
— Replace children in document
DOMDocument::save
— Dumps the internal XML tree back into a file
DOMDocument::saveHTML
— Dumps the internal document into a string using HTML formatting
DOMDocument::saveHTMLFile
— Dumps the internal document into a file using HTML formatting
DOMDocument::saveXML
— Dumps the internal XML tree back into a string
DOMDocument::schemaValidate
— Validates a document based on a schema. Only XML Schema 1.0 is supported.
DOMDocument::schemaValidateSource
— Validates a document based on a schema
DOMDocument::validate
— Validates the document based on its DTD
DOMDocument::xinclude
— Substitutes XIncludes in a DOMDocument Object
DOMDocumentFragment
— The DOMDocumentFragment class
DOMDocumentFragment::append
— Appends nodes after the last child node
DOMDocumentFragment::appendXML
— Append raw XML data
DOMDocumentFragment::__construct
— Constructs a DOMDocumentFragment object
DOMDocumentFragment::prepend
— Prepends nodes before the first child node
DOMDocumentFragment::replaceChildren
— Replace children in fragment
DOMDocumentType
— The DOMDocumentType class
DOMElement
— The DOMElement class
DOMElement::after
— Adds nodes after the element
DOMElement::append
— Appends nodes after the last child node
DOMElement::before
— Adds nodes before the element
DOMElement::__construct
— Creates a new DOMElement object
DOMElement::getAttribute
— Returns value of attribute
DOMElement::getAttributeNames
— Get attribute names
DOMElement::getAttributeNode
— Returns attribute node
DOMElement::getAttributeNodeNS
— Returns attribute node
DOMElement::getAttributeNS
— Returns value of attribute
DOMElement::getElementsByTagName
— Gets elements by tagname
DOMElement::getElementsByTagNameNS
— Get elements by namespaceURI and localName
DOMElement::hasAttribute
— Checks to see if attribute exists
DOMElement::hasAttributeNS
— Checks to see if attribute exists
DOMElement::insertAdjacentElement
— Insert adjacent element
DOMElement::insertAdjacentText
— Insert adjacent text
DOMElement::prepend
— Prepends nodes before the first child node
DOMElement::remove
— Removes the element
DOMElement::removeAttribute
— Removes attribute
DOMElement::removeAttributeNode
— Removes attribute
DOMElement::removeAttributeNS
— Removes attribute
DOMElement::replaceChildren
— Replace children in element
DOMElement::replaceWith
— Replaces the element with new nodes
DOMElement::setAttribute
— Adds new or modifies existing attribute
DOMElement::setAttributeNode
— Adds new attribute node to element
DOMElement::setAttributeNodeNS
— Adds new attribute node to element
DOMElement::setAttributeNS
— Adds new attribute
DOMElement::setIdAttribute
— Declares the attribute specified by name to be of type ID
DOMElement::setIdAttributeNode
— Declares the attribute specified by node to be of type ID
DOMElement::setIdAttributeNS
— Declares the attribute specified by local name and namespace URI to be of type ID
DOMElement::toggleAttribute
— Toggle attribute
DOMEntity
— The DOMEntity class
DOMEntityReference
— The DOMEntityReference class
DOMEntityReference::__construct
— Creates a new DOMEntityReference object
DOMException
— The DOMException class
DOMImplementation
— The DOMImplementation class
DOMImplementation::__construct
— Creates a new DOMImplementation object
DOMImplementation::createDocument
— Creates a DOMDocument object of the specified type with its document element
DOMImplementation::createDocumentType
— Creates an empty DOMDocumentType object
DOMImplementation::hasFeature
— Test if the DOM implementation implements a specific feature
DOMNamedNodeMap
— The DOMNamedNodeMap class
DOMNamedNodeMap::count
— Get number of nodes in the map
DOMNamedNodeMap::getIterator
— Retrieve an external iterator
DOMNamedNodeMap::getNamedItem
— Retrieves a node specified by name
DOMNamedNodeMap::getNamedItemNS
— Retrieves a node specified by local name and namespace URI
DOMNamedNodeMap::item
— Retrieves a node specified by index
DOMNameSpaceNode
— The DOMNameSpaceNode class
DOMNode
— The DOMNode class
DOMNode::appendChild
— Adds new child at the end of the children
DOMNode::C14N
— Canonicalize nodes to a string
DOMNode::C14NFile
— Canonicalize nodes to a file
DOMNode::cloneNode
— Clones a node
DOMNode::contains
— Checks if node contains other node
DOMNode::getLineNo
— Get line number for a node
DOMNode::getNodePath
— Get an XPath for a node
DOMNode::getRootNode
— Get root node
DOMNode::hasAttributes
— Checks if node has attributes
DOMNode::hasChildNodes
— Checks if node has children
DOMNode::insertBefore
— Adds a new child before a reference node
DOMNode::isDefaultNamespace
— Checks if the specified namespaceURI is the default namespace or not
DOMNode::isEqualNode
— Checks that both nodes are equal
DOMNode::isSameNode
— Indicates if two nodes are the same node
DOMNode::isSupported
— Checks if feature is supported for specified version
DOMNode::lookupNamespaceURI
— Gets the namespace URI of the node based on the prefix
DOMNode::lookupPrefix
— Gets the namespace prefix of the node based on the namespace URI
DOMNode::normalize
— Normalizes the node
DOMNode::removeChild
— Removes child from list of children
DOMNode::replaceChild
— Replaces a child
DOMNodeList
— The DOMNodeList class
DOMNodeList::count
— Get number of nodes in the list
DOMNodeList::getIterator
— Retrieve an external iterator
DOMNodeList::item
— Retrieves a node specified by index
DOMNotation
— The DOMNotation class
DOMParentNode
— The DOMParentNode interface
DOMParentNode::append
— Appends nodes after the last child node
DOMParentNode::prepend
— Prepends nodes before the first child node
DOMParentNode::replaceChildren
— Replace children in node
DOMProcessingInstruction
— The DOMProcessingInstruction class
DOMProcessingInstruction::__construct
— Creates a new DOMProcessingInstruction object
DOMText
— The DOMText class
DOMText::__construct
— Creates a new DOMText object
DOMText::isElementContentWhitespace
— Returns whether this text node contains whitespace in element content
DOMText::isWhitespaceInElementContent
— Indicates whether this text node contains whitespace
DOMText::splitText
— Breaks this node into two nodes at the specified offset
DOMXPath
— The DOMXPath class
DOMXPath::__construct
— Creates a new DOMXPath object
DOMXPath::evaluate
— Evaluates the given XPath expression and returns a typed result if possible
DOMXPath::query
— Evaluates the given XPath expression
DOMXPath::registerNamespace
— Registers the namespace with the DOMXPath object
DOMXPath::registerPhpFunctions
— Register PHP functions as XPath functions
DOM 函数
dom_import_simplexml
— Gets a DOMElement object from a SimpleXMLElement object
Improve This Page
Learn How To Improve This Page
•
Submit a Pull Request
•
Report a Bug
+
add a note
User Contributed Notes
There are no user contributed notes for this page.