PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
XMLModify (Function)
In French: XMLModifie
Modifies the content of the current element found in the XML document.
Versions 17 and later
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget 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
// 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(<Name of XML Document> , <New Element Value>)
<Result>: Boolean
  • True if the modification is performed,
  • False otherwise (the ErrorOccurred variable is set to True).
    To find out the error details, use ErrorInfo.
<Name of XML Document>: Character string with quotes
XML document where the modification will be performed.
<New Element Value>: Character string with quotes
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)
Components
WINDEVWEBDEV - Server codeReports and Queries wd230xml.dll
Windows Mobile wp230xml.dll
Java wd230java.jar
Linux wd230xml.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment