Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Query DOM structures based on CSS selectors and/or XPath

false|array
$_documentErrors= 'false'
DOMDocument errors, if any
false
Details
__construct(
null|string $document
=
null, $encoding
=
null
)
:
void
Constructor
Name | Type | Description |
---|---|---|
$document | null|string | |
$encoding |

_getNodeList(
\DOMDocument $document, string|array $xpathQuery
)
:
array
Prepare node list
Name | Type | Description |
---|---|---|
$document | \DOMDocument | |
$xpathQuery | string|array |
Type | Description |
---|---|
array |

getDocumentErrors(
)
:
false|array
Get any DOMDocument errors found
Type | Description |
---|---|
false|array |

queryXpath(
string|array $xpathQuery, string $query
=
null
)
:
\Zend_Dom_Query_Result
Perform an XPath query
Name | Type | Description |
---|---|---|
$xpathQuery | string|array | |
$query | string | CSS selector query |
Type | Description |
---|---|
\Zend_Dom_Query_Result |

registerXpathNamespaces(
array $xpathNamespaces
)
:
void
Register XPath namespaces
Name | Type | Description |
---|---|---|
$xpathNamespaces | array |

setDocument(
string $document, null|string $encoding
=
null
)
:
\Zend_Dom_Query
Set document to query
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |

setDocumentHtml(
string $document, null|string $encoding
=
null
)
:
\Zend_Dom_Query
Register HTML document
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |

setDocumentXhtml(
string $document, null|string $encoding
=
null
)
:
\Zend_Dom_Query
Register XHTML document
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |

setDocumentXml(
string $document, null|string $encoding
=
null
)
:
\Zend_Dom_Query
Register XML document
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |