ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
  • Reading the value of the current element
  • Saving the modifications in the XML file
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
XMLModify (Function)
In french: XMLModifie
Modifies the content of the current element found in the XML document.
Example
// Position on the root
XMLRoot("MyXMLDoc")
// Replace the links
XMLFind("MyXMLDoc", "Link", XMLTag)
WHILE XMLFound("MyXMLDoc") = True
// Calculate the new value of the link
New_link = Process_Link(XMLData("MyXMLDoc"))
// Modification in the XML document
XMLModify("MyXMLDoc", New_link)
XMLNext("MyXMLDoc")
END
Syntax
<Result> = XMLModify(<XML document> , <New element value>)
<Result>: Boolean
  • True if the modification is performed,
  • False otherwise (the ErrorOccurred variable is set to True).
    To get the details of the error, use ErrorInfo.
<XML document>: Character string
XML document where the modification will be performed.
<New element value>: Character string
New value for the current element:
  • value of the tag if the current element is a tag.
  • value of the attribute if the current element is an attribute.
Remarks

Reading the value of the current element

To read the value of the current element, use XMLData.

Saving the modifications in the XML file

To save the modifications performed in an XML file, you must:
  1. Use XMLBuildString. This function retrieves and formats the content of an XML document.
  2. Save the character string generated by XMLBuildString in an XML file. To do so, use fSaveText.
Example:
// Once the XML document was modified
XMLSource = XMLBuildString("XMLDoc")
// Save the XML file
fSaveText("ModifiedExample.xml", XMLSource)
WEBDEV - Browser code This feature is not available.
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