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.Search Inside Up

Previous Top Next


MiniRobotLanguage (MRL)

 

XML.Search Inside Up

XML.siu

Search XML-Flags in upward direction - inside the current tag

 

 

Intention

 

This command is used to search specified XML-Data Flags, starting from the actual position, in upward direction. It will just search inside the current tag.

Any valid  opening bracket "<" will end the search.

 

You can use all these flags, also combinations of these flags (See Link):

 

! SPR - XML-Parser Flags

 

Usage:

 

XML.siu|start attribute

XML.get pos|$$POA

PRT.Actual Position is: $$POA

 

XML.siu will always start from the actual position.

 

 

 

 

Syntax

 

 

XML.Search Inside Up|P2[|P3]

 

 

 

Parameter Explanation

 

P2 - numeric or textual Flag-Description. For Details see here:

.         ! SPR - XML-Parser Flags

 

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:

 

graphic

 

 

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also:

 

  ! Smart Package Robot 's XML-Features

  ! SPR - XML-Parser Flags

  XML. - eXtended Markup Language

  par - parse from var

  sid - Search Inside Down

  sau - Search All Up

  sad - Search All Down