<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Get Len
XML.gle
Get Length of XML-Data
Intention
This command is useful to retrieve the total length of the parsed XML-Data. XML-Data can be addressed from 1 to this number.
Usage is simple:
XML.get len|$$LEN
PRT.Actual Size of XML-Data is: $$LEN
or
XML.get len
$$LEN=$$000
PRT.Actual Size of XML-Data is: $$LEN
Syntax
XML.Get Len[|P2]
Parameter Explanation
P2 - (optional) Variable to return the result.
The result is >0 and contains the total length of the parsed XML-Data in Bytes.
If omitted the result is placed on TOS (Top of Stack).
Example
'***********************************
'
'***********************************
'
$$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
ENR.
This is the result of the sample script:
Remarks
-
Limitations:
-
See also:
• ! Smart Package Robot 's XML-Features
• XML. - eXtended Markup Language