PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • XML functions and threads
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
XMLBuildString (Function)
In French: XMLConstruitChaîne
Retrieves and formats the content of an XML document (created by XMLDocument and modified by the XML functions).
WINDEVWEBDEV - Server codeWINDEV Mobile The corresponding character string can be saved in the format of an XML file by fSaveText. Reminder: fSaveText creates a text file in ANSI format. To create a text file in Unicode format, use fOpen/fWrite.
WEBDEV - Browser code The corresponding character string can be sent to the server for example.
AndroidAndroid Widget Java In the final XML document, the list of attributes is sorted in alphabetical order.
AndroidAndroid Widget Java If the XML document to format contains the declaration of an internal DTD, the description of this DTD will not be transcribed in the final XML document.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
New in version 17
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.
Android This function is now available for the Android 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.
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget Windows MobileJavaPHPAjaxUser code (UMC)
XMLSource is string
Res is boolean
// Load the XML content
XMLSource = fLoadText("example.xml")

// Create the XML document
Res = XMLDocument("XMLDoc", XMLSource)

// Modify the XML document
...

// Retrieve and format the XML document
XMLSource = XMLBuildString("XMLDoc")

// Save the XML file
fSaveText("ModifiedExample.xml", XMLSource)
WEBDEV - Browser code
XMLSource is string
Res is boolean

// Create the XML document
Res = XMLDocument("XMLDoc", XMLSource)

// Modify the XML document
...

// Retrieve and format the XML document
XMLSource = XMLBuildString("XMLDoc")

// Send the XML document to the server
AJAXExécute(MyProc, XMLSource)
Syntax

Retrieving the source of an XML document created by XMLDocument Hide the details

<Result> = XMLBuildString(<Name of XML Document> [, <Creation Options> [, <Output Format>]])
<Result>: Character string
Formatted XML document. This result can be:
  • handled in memory.
  • WINDEVWEBDEV - Server codeWINDEV Mobile saved in a file in XML format by fSaveText.
  • WEBDEV - Browser code sent to the server.
  • ...
<Name of XML Document>: Character string with quotes
Name of XML document to format. This document was created by XMLDocument and it was modified by the XML functions.
<Creation Options>: Optional Integer constant
Combination of following values:
XMLDocumentDefault
(default value)
Generates the XML code with a header and from the root.
XMLCurrentPositionGenerates the XML code from the current position in the XML document (instead of the root)
XMLNoHeaderGenerates the XML code without header.
<Output Format>: Optional Integer constant
Indicates the encoding used in the file header:
XMLNoEncoding
(Default value)
No encoding
XMLEncodingIso8859_1Encoding according to the Latin character set
XMLEncodingIso8859_2Encoding according to Iso8859_2
XMLEncodingIso8859_3Encoding according to Iso8859_3
XMLEncodingIso8859_4Encoding according to Iso8859_4
XMLEncodingIso8859_5Encoding according to Iso8859_5
XMLEncodingIso8859_6Encoding according to Iso8859_6
XMLEncodingIso8859_7Encoding according to Iso8859_7
XMLEncodingIso8859_8Encoding according to Iso8859_8
XMLEncodingIso8859_9Encoding according to Iso8859_9
XMLEncodingUTF16UNICODE encoding
Note: in this case, XMLBuildString generates a 2-byte header to specify the "Byte Order".
XMLEncodingUTF8UNICODE 8 encoding
WEBDEV - Browser codePHP This parameter is not available. The encoding used is Iso8859_1.
AndroidAndroid Widget Java The encoding used by default will be Iso8859_1 (Latin character set).

Retrieving the source of an XML document found in an xmlDocument variable Hide the details

<Result> = XMLBuildString(<XML Document> [, <Creation Options>])
<Result>: Character string
Formatted XML document. This result can be:
  • handled in memory.
  • WINDEVWEBDEV - Server codeWINDEV Mobile saved in a file in XML format by fSaveText.
  • WEBDEV - Browser code sent to the server.
  • ...
<XML Document>: xmlDocument variable
xmlDocument variable containing the XML document to format.
Caution: The encoding of result corresponds to the ..Encoding property of xmlDocument variable. If no encoding is specified, the XML document will be encoded in UTF8 by default.
<Creation Options>: Optional Integer constant
Combination of following values:
XMLDocumentDefault
(default value)
Generates the XML code with a header and from the root.
XMLNoHeaderGenerates the XML code without header.
Remarks

XML functions and threads

If your application is using threads, the XML document is shared among all these threads. See Managing the threads for more details.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230xml.dll
Windows Mobile wp230xml.dll
WEBDEV - Browser code WDJS.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