%XML_GetElementsByTagName function


Function
The function returns the handle to the list of children of XML element that match the given parameters.
Declaration
INT %XML_GetElementsByTagName(
    INT in node, 
    TEXT in  mask
 )

Parameters
node Handle to parent XML node.
mask Sample element mask.
namespace Optional parameter that defines the name of namespace or prefix of given element. Empty parameter is used providing that XML does not contain namespace. The value "*" is used, when there is not necessary explicitly take into account namespace and the searching is done only by mask of element name.

Return value
Handle to the list of XML elements.
Description
The function returns the handle to the list of children of XML element, which match the defined mask of element name and namespace name or its prefix. The searching is executed recursively to depth.
Example
 INT _listElements
 
 _listElements := %XML_GetElementsByTagName(_doc, "elem*")
 ; e.g.: <element>, <element2>
 
 
 ; Returns handle to the list of elements that match the mask of name. It formally equals the first declaration.
 
 _listElements := %XML_GetElementsByTagName(_doc, "elem*","") 
 ; e.g.: <element> , <element2>
 
 
 ; Returns handle to the list of elements that match the mask of name, but ignores namespaces.
 
 _listElements := %XML_GetElementsByTagName(_doc, "elem*","*") 
 ; e.g.: <h:element>, <t:element2>, <element>
 
 
 ; Returns handle to the list of elements that equal the given mask and namespace or its prefix.
 
 _listElements := %XML_GetElementsByTagName(_doc, "elem*","t") 
 ; e.g.: <t:element> 

Napíšte komentár