PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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. This XML document could:
  • have been created with XMLDocument and modified with the XML functions.
  • correspond to an xmlDocument variable.
WEBDEV - Server code The corresponding character string can be saved as an XML file by fSaveText. Reminder: fSaveText creates a text file in ANSI format. To create a Unicode text file, use fOpen / fWrite.
WEBDEV - Browser code The corresponding character string can be sent to the server for example.
WEBDEV - Server codePHPAjax
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
AJAXExecute(MyProc, XMLSource)
Syntax

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

<Result> = XMLBuildString(<Name of XML document> [, <Creation options>])
<Result>: Character string
Formatted XML document. This result can be:
  • handled in memory.
  • WEBDEV - Server code 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.

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.
  • WEBDEV - Server code 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 uses threads, the XML document is shared between all these threads. See Managing threads for more details.
Component : wd240xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment