|
|
|
|
|
- Saving the modifications in the XML file
XMLInsertElement (Function) In french: XMLInsèreElement Inserts an XML element (tag or attribute) into an XML document. The insertion position is relative to the current position.
Syntax
<Result> = XMLInsertElement(<XML document> , <Element name> [, <Value of inserted element> [, <Insertion position> [, <Change of position>]]])
<Result>: Boolean - 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: | | XMLChildItem (Default value) | The insertion is performed in the current level. The inserted part will be a child element of the current element. | XMLNextElement | The insertion is performed just after the current element, in the same branch.
| XMLPreviousElement | The insertion is performed just before the current element, in the same branch.
|
<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) to avoid modifying the current position during the addition.
Remarks 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.
Example:
XMLSource = XMLBuildString("XMLDoc")
fSaveText("ModifiedExample.xml", XMLSource)
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|