<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Get Asc
XML.gsc
Get XML-Data from a file
Intention
This command is used to retrieve the ASCII-Value of any byte position of the XML-Data.
Usage:
$$POS=5
XML.gsc|$$POS|$$ASC
PRT.ASCII at $$POS is: $$ASC
Syntax
XML.Get Asc[|P2][|P3]
Parameter Explanation
P2 - (optional) numeric Byte address of the XML-Data Byte that
should be taken as position. If omitted, actual position is taken.
If P3 is given, the number in P3 is used instead of the actual XML-Position.
P3 - (optional) Variable for the numeric result that is the ASCII-value of the
Character at the actual position. If P3 is specified the ASCII value at that
position is returned instead. If omitted, the result is been placed on TOS
Example
'***********************************
'
'***********************************
'
$$XMF=3w<?xml version="1.0" encoding="UTF-8"?>
' Now we are going to parse it
XML.Parse|$$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
XML.gsc
PRT.ASCII at XML-Root Position is: $$000
PRT.------------------------
$$POS=5
XML.gsc|$$POS|$$ASC
PRT.ASCII at $$POS is: $$ASC
PRT.------------------------
XML.gtr
PRT.------------------------
XML.Dump|1|5
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