PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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.
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 find out the error details, use ErrorInfo.
<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)
Component : wd240xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment