|
|
|
|
|
- XML functions and threads
XMLChildExist (Function) In french: XMLFilsExiste Specifies whether the current tag has children corresponding to the sought type (tag, attribute, ...).
MyDoc is string
MyDoc = fLoadText("example.xml")
XMLDocument("example ", MyDoc)
IF ErrorOccurred = True THEN
Error("the file is not in XML format")
RETURN
END
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: | | XMLAttribute | Searches for the Attribute child elements associated with the current tag. | XMLAttribute + XMLTag | Searches for the Tag child elements OR for the Attribute child elements associated with the current tag. | XMLTag | Searches 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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|