<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Dump
XML.dmp
Show the actual loaded XML-Data
Intention
This command is used to show the actual loaded XML-Data together with the XML-Data-Flags. You can see a sample of such a XML-Data Dump here:
At the very left side you can see the sequential Byte-number (Address) of the Data Bytes.
These start at 1 and go up to the Length of your XML-Data in Bytes.
Then you can see the "Level" of the current Data-Byte.
Next you can see the ASCI-Value of the Data Byte itself.
Next, after the C: you can see the Character String of that Data-Byte.
Finally there are the XML-Flags of each Data Byte.
Syntax
XML.Dump[|P2][|P3]
Parameter Explanation
P2 - (optional) numeric Parameter - Start-Byte
P3 - (optional) numeric Parameter - End-Byte
Example
'***********************************
'
'***********************************
'Prototype für IML.
$$PRO=Open Bracket
$$TXT=a real Open Bracket
$$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
' Hier gehts los
PRT.------------------------
IML.$$PRO|1|500
$$ERG=$$000
PRT. Pos. $$ERG is "$$TXT".
EIF.
PRT.------------------------
IML.$$PRO|$$ERG
PRT. Pos. $$ERG is "$$TXT".
EIF.
IML.$$PRO|($$ERG+1)
CAL.$$PLU=$$ERG+1
PRT. Pos. $$PLU is "$$TXT".
ELS.
PRT. Pos. $$PLU is NOT "$$TXT".
EIF.
PRT.------------------------
' Now we are scanning for "Bit not set"
IML.$$PROz|$$ERG|($$ERG+50)
$$RES=$$000
PRT. Pos. $$RES is the first byte after "$$TXT".
EIF.
PRT.------------------------
PRT. We are going to Dump 4 Bytes
XML.Dump|($$ERG-1)|($$RES+1)
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