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
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 (with quotes)
Name of 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.
XMLTagSearches for the Tag 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.
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