<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Get Flags
XML.gfl
Get XML-Flags
Intention
This command is used to retrieve the numerical XML-Flag Data for any Byte of the loaded XML-Code.
Usage is simple:
' Result will be on TOS (Top of Stack)
XML.gfl
' We take it drom TOS into Variable $$ERG
$$ERG=$$000
' We display the numeric value
PRT.Flags are: $$ERG
' This converts the number into a textual representation
XML.Ftxt|$$ERG|$$TXT
' We display the text
PRT. As Text: $$TXT
' Now we esamine the location $$POS+1
' Result comes into $$ERG
XML.gfl|($$POS+1)|$$ERG
' We convert and display its
XML.Ftxt|$$ERG|$$TXT
PRT. Next Byte as Text: $$TXT
Syntax
XML.Get Flags|P2[|P3]
Parameter Explanation
P2 - (optional) numeric parameter that is a byte address of the XML-Data.
If omitted, the current position's flags are being used.
P3 - (optional) Variable for the result. If omitted TOS is used..
Example
'***********************************
'
'***********************************
'Prototype für IML.
$$PRO=Open Bracket
$$TXT=a real Open Bracket
$$XMF=?pfad\SQ_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.------------------------
XML.sdn|&EXACT:Patch
XML.get pos|$$POS
PRT.Actual Position is: $$POS
XML.gfl
$$ERG=$$000
PRT.Flags are: $$ERG
XML.Ftxt|$$ERG|$$TXT
PRT. As Text: $$TXT
XML.gfl|($$POS+1)|$$ERG
XML.Ftxt|$$ERG|$$TXT
PRT. Next Byte as Text: $$TXT
PRT.------------------------
XML.Dump|($$POS-3)|($$POS+3)
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