ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / XML file functions
  • XML functions and threads
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
XMLBuildString (Function)
In french: XMLConstruitChaîne
Retrieves and formats the content of an XML document. This XML document could:
  • have been created with XMLDocument and modified with the XML functions.
  • correspond to an xmlDocument variable.
Reports and Queries
SourceXML is string
Res is boolean
// Chargement du contenu XML
SourceXML = fLoadText("exemple.xml")

// Création du document XML
Res = XMLDocument("DocXML", SourceXML)

// Modification du document XML
...

// Récupération et mise en forme du document XML
SourceXML = XMLBuildString("DocXML")

// Enregistrement du fichier XML
fSaveText("ExampleModifié.xml", SourceXML)
Syntax

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

<Result> = XMLBuildString(<Name of the XML document> [, <Creation options> [, <Output format>]])
<Result>: Character string
Formatted XML document. This result can be:
  • handled in memory.
  • ...
<Name of the XML document>: Character string
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:
XMLCurrentPositionGenerates the XML code from the current position in the XML document (instead of the root).
XMLDocumentDefault
(default value)
Generates the XML code with a header and from the root.
XMLFormattingGenerates XML code with formatting (indentation and carriage returns).
XMLNoHeaderGenerates the XML code without header.
<Output format>: Optional Integer constant
Indicates the encoding used in the file header:
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
XMLEncodingIso8859_15Latin-9 encoding
XMLEncodingUTF8UNICODE 8 encoding
XMLEncodingUTF16UNICODE encoding
Note: in this case, the function XMLBuildString function generates a 2-byte header to specify the "Byte Order".
XMLNoEncoding
(Default value)
No encoding

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.
  • ...
<XML document>: xmlDocument variable
xmlDocument variable containing the XML document to format.
Warning Result encoding corresponds to property Encoding property of variable xmlDocument. If no encoding is specified, the XML document will be encoded in UTF-8.
<Creation options>: Optional Integer constant
Combination of following values:
XMLDocumentDefault
(default value)
Generates the XML code with a header and from the root.
XMLFormattingGenerates XML code with formatting (indentation and carriage returns).
XMLNoHeaderGenerates the XML code without header.
Remarks

XML functions and threads

If your application uses threads, the XML document is shared between all these threads. For more details on threads, see Managing threads.
Component: wd300xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help