<< 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 as Text
XML.gftxt
Get XML-Flags as text
Intention
This command will retrieve the XML-Flags from a specified Byte-Address (P2) of the XML-Data. The result will be converted to readable text.
Usage is simple:
XML.gftxt
$$TXT=$$000
PRT.Actual Flags are: $$TXT
PRT.------------------------
XML.gftxt|($$POS+1)|$$TXT
PRT.Actual Flags are: $$TXT
PRT.------------------------
Syntax
XML.Get Flags as Text[|P2][|P3]
Parameter Explanation
P2 - (optional) numeric Byte address of the XML-Data Byte from which
you want the flags.
P3 - (optional) Variable for the textual result.
If omitted, teh result is been placed on TOS.
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.------------------------
XML.gftxt
$$TXT=$$000
PRT.Actual Flags are: $$TXT
PRT.------------------------
XML.gftxt|($$POS+1)|$$ERG
PRT.Actual Flags are: $$ERG
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:
Here is the important part of the used XML-Data that is analyzed here:
<?xml version="1.0" encoding="UTF-8"?>
<!-- comment attrib="Hall"-->
<PatchInformation XMLVersion="1.0000.0000.4918"
You can find the XML-Sample-Data file in the Installation folder in the Samples-Folder "XML".
Remarks
-
Limitations:
-
See also:
• ! Smart Package Robot 's XML-Features
• XML. - eXtended Markup Language