<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Get Attrib Count
XML.acnt
Get number of attributes
Intention
This command is used to retrive the number of attributes of the Tag that is at the actual position. The actual position is the position that you can set using any search command or
XML.set pos|$$POS
Usage is simple:
XML.acnt|$$ERG
PRT. Here we have $$ERG attributes
Syntax
XML.Get Attrib Count[|P2]
Parameter Explanation
P2 - (optional) Variable to return the result. If omitted, the result is been
placed on TOS.
Example
'***********************************
'
'***********************************
'Prototype für IML.
$$XMF=?pfad\Small_XML.txt
NEF.$$XMF
MBX.File $$XMF was not found!
GTO.enx
EIF.
' Now we are going to parse it
XML.Load File|$$XMF
' We check if there are errors
JIT.Lab_Err
' We get the "actual position" - after parsing.
XML.get pos|$$POS
PRT.Actual Position after Parsing is: $$POS
XML.get len|$$LEN
PRT.Actual Size of XML-Data is: $$LEN
' Hier gehts los
PRT.------------------------
XML.acnt|$$ERG
PRT. We have $$ERG attributes here.
PRT.------------------------
XML.sdn|{&EXACT:Product}
XML.get pos|$$POS
PRT.Actual Position after Search is: $$POS
XML.acnt|$$ERG
PRT. We have $$ERG attributes here, also.
PRT.------------------------
MBX.!
:enx
ENR.
'-----------------------------------------------------------
' Error Handler
:Lab_Err
XML.get error|$$ERT
DBP.$$ERT
ENR.
This is the result of the sample script:
Remarks
-
Limitations:
-
See also:
• ! Smart Package Robot 's XML-Features
• XML. - eXtended Markup Language
•