ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
  • Principle for handling an XML document
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Principle for handling an XML document
To manage an XML document, see Using an xmlDocument variable. This method allows you to use a XSD file.
Several types of specific variables are available:
xmlAttributeThe xmlAttribute type is used to handle the attributes of a node in an XML document.
xmlDocumentThe xmlDocument type is used to handle an XML file.
xmlNamespaceThe xmlNamespace type is used to handle the XML namespace of a node attribute in an XML document.
xmlNodeThe xmlNode type is used to handle a node of an XML document.
Several specific functions can be used to handle the xmlDocument variables
<JSON variable>.ToXMLConverts a JSON string to XML.
<xmlDocument variable>.BuildStringRetrieves and formats the content of an XML document.
<xmlDocument variable>.ExecuteXPathExecutes an XPATH query in an xmlDocument variable.
<xmlDocument variable>.SaveSaves an XML document in a file.
<xmlDocument variable>.ValidDocumentValidates an XML document from an XSD schema.
<xmlDocument>.ToJSONConverts an XML string to JSON.
<xmlNode variable>.FindNamespaceByNameFinds an XML namespace according to its XML node and in the parents of the node.
<xmlNode variable>.FindNamespaceByURIFinds an XML namespace from its URI (Universal Resource Identifier) in a node and in the parents of this node.
<xmlNode variable>.ValidNodeValidates an XML node, its children and its attributes from its description in the XSD schema linked to the XML document.
<xmlNode>.ToJSONConverts an XML string to JSON.
Some functions are also linked to the management of XML:
<Source>.ExportXMLExports the records found in a data file (HFSQL or OLE DB), view or query to an XML file.
<Source>.ImportXMLImports an XML file into an HFSQL Classic or Client/Server data file (data file described in the data model editor or declared by <Source>.Declare, <Source>.DeclareExternal or <Source>.DescribeFile).
<Source>.RecordToXMLRetrieves the structure and the value of the current record and exports them into a character string in XML format.
J2EERunXMLRuns a procedure on a server of J2EE XML Web services.
<Looper>.ToXMLCreates an XML file with data from a Looper control (Looper control based on a data file or populated programmatically).
SOAPRunXMLRuns a procedure on a SOAP server.
<Table>.ToXMLCreates an XML file from the data found in a Table or TreeView Table control.
Related Examples:
Reading and writing in XML format Unit examples (WINDEV): Reading and writing in XML format
[ + ] Using the XMLxxx functions to:
- Create an XML document
- Read an XML document
XML parser Unit examples (WINDEV): XML parser
[ + ] Studying the content of an XML file via the XMLxxx functions of WINDEV
WD Syntactic Coloring Training (WINDEV): WD Syntactic Coloring
[ + ] This example proposes a base class used to perform a standard syntax highlighting on some text.
This highlighting is based on a rough analysis of the lemmes found in a text in order to identify the elements of a programming language for instance.
It can be overridden or derived in order to customize the system and the highlighting language.
This example is used to highlight SQL code and XML code but it can be extended to highlight other languages or other text formats.
WD Multimedia Complete examples (WINDEV): WD Multimedia
[ + ] This example shows how to play animations, audio and video files (MP3, WAV, AVI, MPEG, etc.) using the Multimedia control in WINDEV.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/26/2023

Send a report | Local help