PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV, WEBDEV, WINDEV Mobile 24 feature!
  • Limitations
  • XML functions and threads
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Runs an XPATH query in an xmlDocument variable.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
clDoc is xmlDocument = XMLOpen(n, fromString)
c is xpathResult = clDoc.ExecuteXPath("/root/text()")
IF c..IsValue THEN
Trace(c..Value)
ELSE
FOR EACH node OF c..Node
Trace("Node: " + node..Text)
END
FOR EACH attrib OF c..Attribute
Trace("Node: " + attrib..Name)
END
END
Syntax

Running an XPATH query on an xmlDocument variable Hide the details

<Result> = <XML document>.XMLExecuteXPath(<Text of XPath query>)
<Result>: xpathResult variable
xpathResult variable containing the result of the XPATH query.
Reading the result:
  • ..IsValue is used to find out whether the result is a value.
  • For a selection query (the result is not a value), the xpathResult variable must be browsed.
  • For a calculation query (the result is a value), ..Value is used to read the result.
<XML document>: xmlDocument variable
Name of the xmlDocument variable containing the XML code to analyze.
<Text of XPath query>: Character string (with quotes)
Text of the XPath query to run.
Remarks

Limitations

  • Several XPath browse queries cannot be nested.
  • XMLSavePosition and XMLRestorePosition cannot be used to save/restore a position when browsing the result of a select XPath query.

XML functions and threads

If your application uses threads, the XML document is shared between all these threads. See Managing threads for more details.

If the current position in an XML document is modified in a thread, the current position in this XML document is modified for all the threads.
Component : wd240xml.dll
Minimum required version
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment