ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
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
XMLResult (Function)
In french: XMLRésultat
Returns the result of a calculation XPath query. This query was executed with XMLExecuteXPath.
Example
// Load the XML file
MyDoc is string
MyDoc = fLoadText("example.xml")
// Text of query: Find the Index tag
XPathQuery is string = "Help/Function/Index"
// Create the document
XMLDocument("Example", MyDoc)
IF ErrorOccurred = True THEN
Error("the file is not in XML format")
RETURN
END
b is boolean
b = XMLExecuteXPath("Example", XPathQuery)
// Is it a calculation query?
IF b = True AND XMLOut("Example") = True THEN
 // The calculation result is as follows
 Trace("XMLResult = " + XMLResult("Example"))
END
// Is it a selection XPath query?
IF XMLFound("Example") = True THEN
// Browse the result selection
WHILE XMLFound("Example") = True
Trace(XMLPath("Example"))
XMLNext("Example")
END
// Browse completed, end the query
XMLCancelSearch("Example")
END
Syntax
<Result> = XMLResult(<XML document>)
<Result>: Type corresponding to the result of XPath query
Result of XPath calculation query run by XMLExecuteXPath.
<XML document>: Character string
Name of XML document used. This document was created by XMLDocument.
Business / UI classification: Business Logic
Component: wd290xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help