PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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
XMLInsertDocument (Function)
In French: XMLInsèreDocument
Inserts the current XML tag found in an XML document into another XML document.
AndroidAndroid Widget Java An XML document can only contain a single tag at its root.
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
Result1 is boolean
// Inserts the current tag found in MySourceDoc into MyTargetDoc
// This tag will be a child tag of the current tag found in MyTargetDoc
Result1 = XMLInsertDocument("MyTargetDoc", "MySourceDoc", XMLChildItem)
IF Result1 = True THEN
        Info("Insertion successful")
ELSE
        Info("The insertion failed")
END
Syntax
<Result> = XMLInsertDocument(<Name of Target XML Document> , <Name of Source XML Document> [, <Insertion Position>])
<Result>: Boolean
  • True if the insertion is performed,
  • False otherwise (the ErrorOccurred variable is set to True).
    To find out the error details, use ErrorInfo.
<Name of Target XML Document>: Character string with quotes
Name of XML document into which the insertion will be performed.
<Name of Source XML Document>: Character string with quotes
Name of XML document containing the tag that will be inserted into an XML document.
<Insertion Position>: Optional Integer constant
Position where the addition is performed in relation to the current tag in <Name of Target XML Document>. This parameter can take one of the following values:
XMLPreviousElementThe insertion is performed just before the current tag, in the same branch.
XMLNextElement
(Default value)
The insertion is performed just after the current tag, in the same branch.
XMLChildItemThe insertion is performed in the current level. The inserted part will be a child tag of the current tag.
Remarks

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