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.Reparse

Previous Top Next


MiniRobotLanguage (MRL)

 

XML.Reparse

XML.rpa

Parse changed XML-Data and re-generate XML-Flags

 

 

Intention

 

This command is used to Parse already loaded or parsed XML-Data again.

This is only needed in very few cases, after you have changed the XML-Data using

any of the commands that change the XML-Data, like:

    ssc - Set Asc

    scr - Set Chr

    sxp - Set XML Part

 

If you use sxp - Set XML Part and change the total length of the XML-Data then the reparse will be done automatically.

 

I other cases, when you just change a few characters, you may want to make the reparse manually, because in these cases its not done automatically (because it takes time on large XML-files).

 

 

 

Syntax

 

 

XML.Reparse

 

 

 

Parameter Explanation

 

-

 

 

 

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:SURLS

XML.get pos|$$POS

PRT.Actual Position is: $$POS

XML.gbl|$$BSA|$$BSE

PRT.Current Block starts at: $$BSA

PRT.Current Block ends at: $$BSE

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

PRT.This is the block before change:

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

XML.Print

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

PRT.Now we use Set-XML-Part to change the block

$$TXT=!!!!!!!! New Block-Text !!!!!!!!!!

XML.sxp|$$BSA|$$BSE|$$TXT

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

XML.Print

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

PRT. In this case the Reparse was done internally.

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

PRT.Now we will make a character change in the XML-Data

XML.scr|$$BSA|>

XML.ReParse

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

XML.Print

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

PRT. We Dump Positions

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

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

XML.Dump|($$BSB-3)|($$BSB+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

    ssc - Set Asc

    scr - Set Chr

    sxp - Set XML Part