387.1. Zend\Dom\Query
Query DOM structures based on CSS selectors and/or XPath
387.1.1. Methods
387.1.1.1. __construct
-
__construct()
Constructor
Parameters: |
- null|string –
- null|string –
|
387.1.1.2. setEncoding
-
setEncoding()
Set document encoding
Parameters: | string – |
Return type: | Query |
387.1.1.3. getEncoding
-
getEncoding()
Get document encoding
387.1.1.4. setDocument
-
setDocument()
Set document to query
Parameters: |
- string –
- null|string – Document encoding
|
Return type: | Query
|
387.1.1.5. setDocumentHtml
-
setDocumentHtml()
Register HTML document
Parameters: |
- string –
- null|string – Document encoding
|
Return type: | Query
|
387.1.1.6. setDocumentXhtml
-
setDocumentXhtml()
Register XHTML document
Parameters: |
- string –
- null|string – Document encoding
|
Return type: | Query
|
387.1.1.7. setDocumentXml
-
setDocumentXml()
Register XML document
Parameters: |
- string –
- null|string – Document encoding
|
Return type: | Query
|
387.1.1.8. getDocument
-
getDocument()
Retrieve current document
387.1.1.9. getDocumentType
-
getDocumentType()
Get document type
387.1.1.10. getDocumentErrors
-
getDocumentErrors()
Get any DOMDocument errors found
387.1.1.11. execute
-
execute()
Perform a CSS selector query
Parameters: | string – |
Return type: | NodeList |
387.1.1.12. queryXpath
-
queryXpath()
Perform an XPath query
Parameters: |
- string|array –
- string|null – CSS selector query
|
Throws ExceptionRuntimeException: |
| |
Return type: | NodeList
|
387.1.1.13. registerXpathNamespaces
-
registerXpathNamespaces()
Register XPath namespaces
Parameters: | array – |
Return type: | void |
387.1.1.14. registerXpathPhpFunctions
-
registerXpathPhpFunctions()
Register PHP Functions to use in internal DOMXPath
Parameters: | bool – |
Return type: | void |
387.1.1.15. getNodeList
-
getNodeList()
Prepare node list
Parameters: |
- DOMDocument –
- string|array –
|
Return type: | array
|
387.1.2. Constants
387.1.2.1. DOC_XML
387.1.2.2. DOC_HTML
387.1.2.3. DOC_XHTML