|
|
|
|
- Reading the value of the current element
- Saving the modifications in the XML file
XMLModify (Function) In french: XMLModifie Modifies the content of the current element found in the XML document.
// 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: - Use XMLBuildString. This function retrieves and formats the content of an XML document.
- 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)
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|