xml_GetAttributes ( parserID; names; values ) --> noAttributes
-
--> parserID : longint
-
--> names : text array
-
--> values : text array
-
<-- noAtributes : longint
This command is called during a "startElementHandler" callback to return any attributes and values found in the element into two text arrays. The command can be called as many times as necessary during a "startElementHandler" callback, but at no other time.
Pass this command the current parserID and two text arrays, and the text arrays will be populated with the attribute names and values so that they're easy to work with. e.g.
|
C_LONGINT($1;$parser)
C_TEXT($2;$elementName)
C_LONGINT($3;$numberOfAttributes)
$parser:=$1
$elementName:=$2
$numberOfAttributes:=$3
tagDepth:=tagDepth+1
If($numberOfAttributes>0)
ARRAY TEXT($attrNames;0)
ARRAY TEXT($attrValues;0)
$noAttributes:=xml_GetAttributes($parser;$attrNames;$attrValues)
End if
|
|
|
|
|