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
  • Using a tag associated with a namespace
  • 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
XMLNamespace (Function)
In french: XMLNamespace
Returns the prefix of the namespace associated with the current tag in an XML document.
Example
MonDoc is string
MonDoc = fLoadText("Exemple.xml")
XMLDocument("exemple", MonDoc)
IF ErrorOccurred = True THEN
	Error("Le fichier n'est pas au format XML")
	RETURN
END
// On se positionne sur la première balise du fichier
IF XMLFirst() = True THEN
	IF XMLNamespace() <> "" THEN
		Info("Le préfixe utilisé pour l'espace de nommage est : " + XMLNamespace(), ...
			"L'URI correspondante est : " + XMLNamespaceURI())
	ELSE
		IF ErrorOccurred = True THEN 
			Info("L'élément lu n'est pas une balise")
	  	ELSE
			Info("La balise ne contient pas d'espace de nommage")
		END
	END
END
XMLClose()
Syntax
<Result> = XMLNamespace([<XML document>])
<Result>: : Character string
  • Prefix of namespace used for the current tag,
  • Empty string (""):
    • if the tag does not have a naming prefix.
    • if the XML document is not positioned on a tag. The ErrorOccurred variable is set to True.
<XML document>: : Optional character string
Name of XML document to use. This document contains the XML code and it was created by XMLDocument. If this parameter is not specified, XMLNamespace applies to the last XML document used in the current thread.
Remarks

Using a tag associated with a namespace

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.
Business / UI classification: Business Logic
Component: wd300xml.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help