<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Up Open Bracket
XML.upob
Move position to close bracket in downward direction
Intention
This command is used to move the actual position to the next < Open bracket in upward direction.
Usage:
' The new position will be in $$ERG
' if nothing found $$ERG=0
XML.upob|$$ERG
' One Parameter will also work.
XML.upob
XML.get pos|$$POS
PRT.Actual Position is: $$POS
Syntax
XML.Up Open Bracket[|P2]
Parameter Explanation
P2 - (optional) Variable to return the result, that is the new position or zero,
if nothing was found. . The result is 0 in case nothing was found.
If something was found, the actual position will be set to this new position.
If P2 is omitted the result is been placed on TOS.
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.dnob|$$ERG
XML.get pos|$$POS
PRT.Actual Position is: $$POS
PRT.------------------------
PRT. We are going to Dump these Bytes.
PRT.-------------------------
XML.Dump|($$ERG-5)|($$ERG+5)
PRT.------------------------
XML.upob|$$ERG
XML.get pos|$$POS
PRT.Actual Position is: $$POS
PRT.------------------------
PRT. We are going to Dump these Bytes.
PRT.-------------------------
XML.Dump|($$ERG-5)|($$ERG+5)
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" XMLLastUpdated="1/30/2010" PatchCount="1261">
<Products>
<Product ProductName="WINDOWS NT 4.0" SName="NTW">
<SPS>
<SP SPName="SP3"/>
<SP SPName="SP4"/>
<SP SPName="SP5"/>
<SP SPName="SP6"/>
<SP SPName="SP6A"/>
</SPS>
</Product>
<Patch PatchName="SQLServer2008-KB2716433-x86.exe" SQNumber="Q2716433">
<DL SFN="SQLServer2008-KB2716433-x86.exe" FS="188008400">
<SURLS>
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