ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
  • XML functions and threads
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
XMLChildExist (Function)
In french: XMLFilsExiste
Specifies whether the current tag has children corresponding to the sought type (tag, attribute, ...).
Example
MyDoc is string
MyDoc = fLoadText("example.xml")
XMLDocument("example ", MyDoc)
IF ErrorOccurred = True THEN
Error("the file is not in XML format")
RETURN
END
// Browses the file and specifies whether the tag has an attribute
XMLFind("example", Null)
WHILE XMLOut("example") = False
IF XMLChildExist("example", XMLAttribute)
Trace(XMLElementName("example") + " has attributes")
ELSE
Trace(XMLElementName("example") + " has no attribute")
END
XMLNext("example")
END
XMLClose("example")
Syntax
<Result> = XMLChildExist(<XML document> [, <Type of child element>])
<Result>: Boolean
  • True if the current tag has children of the specified type,
  • False otherwise.
<XML document>: Character string
Name of the XML document used. This document contains the XML code to study and it was created by XMLDocument.
<Type of child element>: Optional Integer constant
Type of child element:
XMLAttributeSearches for the Attribute child elements associated with the current tag.
XMLAttribute + XMLTagSearches for the Tag child elements OR for the Attribute child elements associated with the current tag.
XMLTagSearches for the Tag child elements associated with the current tag.
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.
Business / UI classification: Business Logic
Component: wd290xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help