<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > XML. - after parse > XML-Parser * XML. (after Parse) |
MiniRobotLanguage (MRL)
XML.Goto First Node
XML.gtfn
Move actual Position to the first node in the XML-Data
Intention
This command is used to move actual position to the fist "<" first node in the XML-Data.
If your XML-Data looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- comment attrib="Hall"-->
<PatchInformation XMLVersion="1."'>
<Products>
then the black marked < is the actual position after a call to "First node".
All System- and comment-Tags will be ignored.
This is similar like XML.gfn but will not return a result and not place anything on the stack.
Syntax
XML.Goto First Node
Parameter Explanation
-
Example
'***********************************
'
'***********************************
'
$$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.gtfn
XML.get pos|$$POS
PRT.Actual Position is: $$POS
PRT.------------------------
XML.Dump|($$POS-3)|($$POS+12)
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>
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
•