ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
  • Limitations
  • XML functions and threads
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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
<Result> = <XML document>.XMLExecuteXPath(<Text of XPath query>)
<Result>: xpathResult variable
xpathResult variable containing the result of the XPATH query.
Reading the result:
  • The IsValue property allows you to know if 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), the Value property reads the result.
<XML document>: xmlDocument variable
Name of the xmlDocument variable containing the XML code to analyze.
<Text of XPath query>: Character string
Text of the XPath query to execute.
Remarks

Limitations

  • Several XPath browse queries cannot be nested.
  • Executing an XPATH query on an XML document:
    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. For more details on threads, see Managing threads.

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: wd290xml.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/30/2023

Send a report | Local help