XML-Parser * XML. (after Parse)

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > XML-Parser > XML. - after parse >

XML-Parser * XML. (after Parse)

XML.Start Tag Up

Previous Top Next


MiniRobotLanguage (MRL)

 

XML.Start Tag Up

XML.stu

Move the actual position to the next Start Tag in upward direction

 

 

Intention

 

This command will move the actual position to the next Start Tag in upward direction.

 

 

 

Syntax

 

 

XML.Start Tag Up[|P2]

 

 

 

Parameter Explanation

 

P2 - (optional) Variable to return the result. The result is >0 and contains the

          actual position that is on a start-tag.

          If nothing was found the result is zero, and the actual position is not changed.

          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|Affec&ANDTHEN:Prod

XML.get pos|$$POA

PRT.Actual Position after sdn is: $$POA

PRT.------------------------

XML.set pos|-1

XML.get pos|$$POB

PRT.Actual Position at XML-Length is: $$POB

PRT.------------------------

XML.sun|Affec&ANDTHEN:Prod

XML.get pos|$$POC

PRT.Actual Position after sun is: $$POC

PRT.------------------------

XML.Dump|($$POA-3)|($$POA+3)

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.

ENR.

 

This is the result of the sample script:

 

graphic

 

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also:

 

  ! Smart Package Robot 's XML-Features

  ! SPR - XML-Parser Flags

  XML. - eXtended Markup Language

  par - parse from var