- Saving the modifications in the XML file
In french: XMLInsèreElement
Inserts an XML element (tag or attribute) into an XML document. The insertion position is relative to the current position.
<Result> = XMLInsertElement(<XML document> , <Element name> [, <Value of inserted element> [, <Insertion position> [, <Change of position>]]])
- True if the insertion was performed,
- False otherwise (the ErrorOccurred variable is set to True).
To get more details on the error, use ErrorInfo.
<XML document>: Character string
XML document into which the insertion will be performed.
<Element name>: Character string
Name of element to add. The added element and the current element have the same type:
- If the current element is a tag, the inserted element is a tag.
- If the current element is an attribute, the inserted element is an attribute.
<Value of inserted element>: Optional character string
Value of new element. This parameter corresponds to an empty string ("") by default.
<Insertion position>: Optional Integer constant
Position where the addition is performed in relation to the current element. This parameter can take one of the following values:
<Change of position>: Optional boolean
- True to be positioned on the added element. In this case, the added element becomes the current position.
- False (default value) to avoid modifying the current position during the addition.
Saving the modifications in the XML file
To save the modifications performed in an XML file, you must:
- Use the XMLBuildString function. 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 the fSaveText function.
// Once the XML document was modified
XMLSource = XMLBuildString("XMLDoc")
// Save the XML file
Business / UI classification: Business Logic
This page is also available for…