SYNOPSISint xmlTreeXPathRegisterNs(xmlXPath xpath, string prefix,
string URI)
Parameters:
xpath
- the xmlXPath
to register a namespace forprefix
- the prefix for the namespaceURI
- the URI for the namespace
Returns:
0
- success-1
- error
DESCRIPTIONxmlTreeXPathRegisterNs()
registers a prefix that can be used in
an XPath expression. This does not affect the document the xpath is
operating on in any way, and only applies to XPath expressions that
execute on the xmlXPath
object.
EXAMPLE<$xpath = (xmlTreeNewXPath($doc))>
<$ret = (xmlTreeXPathRegisterNs($xpath,
'ts', 'urn:Thunderstone'))>
<$nodes = (xmlTreeXPathExecute($xpath, '//ts:item[@price>5]'))>
SEE ALSOxmlTreeNewXPath
,
xmlTreeXPathExecute