ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / XML file functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
XMLResult (Function)
In french: XMLRésultat
Returns the result of a calculation XPath query. This query was executed with XMLExecuteXPath.
Example
// Chargement du fichier XML
MonDoc is string
MonDoc = fLoadText("exemple.xml")
// Texte de la requête : Recherche de la balise Index
RequeteXPath is string = "Aide/Fonction/Index"
// Création du document
XMLDocument("Exemple", MonDoc)
IF ErrorOccurred = True THEN
	Error("le fichier n'est pas au format XML")
	RETURN
END
b is boolean
b = XMLExecuteXPath("Exemple", RequeteXPath)
// Est-ce une requête de calcul ?
IF b = True AND XMLOut("Exemple") = True THEN
	 // Voilà le résultat du calcul
	 Trace("XMLResultat = " + XMLResult("Exemple"))
END
// Est-ce une requête XPath de sélection ?
IF XMLFound("Exemple") = True THEN
	// Parcours de la sélection résultat
	WHILE XMLFound("Exemple") = True
		Trace(XMLPath("Exemple"))
		XMLNext("Exemple")
	END
	// Parcours terminé, on termine la requête
	XMLCancelSearch("Exemple")
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 the XML document used. This document was created by XMLDocument.
Business / UI classification: Business Logic
Component: wd300xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help