XML_GET_ATTRIBUTE_VAUE$
|
Syntax: |
XML_GET_ATTRIBUTE_VALUE$(<Index>) <Index>
= <NUM-EXPRESSION> |
||
|
|
|
||
|
Meaning: |
XML
elements may contain parameters, e.g. <port protocol="tcp"
portid="1">. The XML element <port> contains two
parameters: protocol and portid. When the function XML_PARSER is executed and the macro is called
after processing a begin element (EBUS_DATA = 1), XML_GET_NUMBER_OF_ATTRIBUTES
contains the number of the parameters of the XML element. XML_GET_ATTRIBUTE_NAME$ and
XML_GET_ATTRIBUTE_VALUE$ return the parameter names and the parameter values. <Index>
specifies the number of the parameter (1 refers to the first parameter, 2
refers to the second parameter, ...) |
||
|
Parameter: |
|
||
|
Sample: |
RET% = PARSE_XML("Test.xml","tlb",PROCESS.XML) IF RET% <> 1 THEN ERRORMES =
"Error " + STR$(RET%) ENDIF Macro PROCESS.XML: CASE EBUS_DATA
OF 1 // EBUS_DATA$ contains the begin element,
e.g. "port"
VALUE2$ = XML_GET_ATTRIBUTE_VALUE$(2) // VALUE2$ contains "1"
OF 2 //
OF 3 // ENDCASE |
||
|
See also: |
|