<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Search Inside Down
XML.sid
Search XML-Flags in down direction - inside the current tag
Intention
This command is used to search specified XML-Data Flags, starting from the actual position, in downward direction. It will just search inside the current tag.
Any valid closing bracket ">" will end the search.
You can use all these flags, also combinations of these flags (See Link):
Usage:
XML.sid|start attribute
XML.get pos|$$POA
PRT.Actual Position is: $$POA
XML.sid will always start from the actual position.
Syntax
XML.Search Inside Down|P2[|P3]
Parameter Explanation
P2 - numeric or textual Flag-Description. For Details see here:
P3 - (optional) Variable to return the result. The result is >0 and contains the
actual position that matched all of the specified flags.
If omitted, the result is been placed on TOS.
Example
'***********************************
'
'***********************************
'
$$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|$$POA
PRT.Actual Position after sdn is: $$POA
PRT.------------------------
XML.inc pos
XML.sid|start attribute
XML.get pos|$$POB
PRT.Actual Position at Start attrib is: $$POB
PRT.------------------------
' We go to the Close bracket >
XML.dncb
XML.get pos|$$POS
PRT.Actual Position at Close bracket is: $$POS
PRT.------------------------
XML.dec pos
XML.siu|start attribute
XML.get pos|$$POC
PRT.Actual Position after sun is: $$POC
PRT.------------------------
XML.Dump|($$POA-3)|($$POB+4)
PRT.------------------------
XML.Dump|($$POB-3)|($$POB+3)
PRT.------------------------
XML.Dump|($$POC-3)|($$POC+3)
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