Thunderstone Software Document Search, Retrieval, and Management
Search:
Vortex Manual
 

xmlTreeXPathRegisterNs

 

SYNOPSIS

int xmlTreeXPathRegisterNs(xmlXPath xpath, string prefix,
                               string URI)

Parameters:

  • xpath - the xmlXPath to register a namespace for

  • prefix - the prefix for the namespace

  • URI - the URI for the namespace

Returns:

  • 0 - success

  • -1 - error


DESCRIPTION
xmlTreeXPathRegisterNs() 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 ALSO
xmlTreeNewXPath, xmlTreeXPathExecute


Copyright © Thunderstone Software     Last updated: Mon Feb 18 10:28:15 EST 2013
 
Home   ::   Products   ::   Solutions   ::   How to Buy   ::   Support   ::   Contact Us   ::   News   ::   About
Copyright © 2013 Thunderstone Software LLC. All rights reserved.