XML-Parser * XML. (no Parse needed)

<< Click to Display Table of Contents >>

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

XML-Parser * XML. (no Parse needed)

XML.Clear

Previous Top Next


MiniRobotLanguage (MRL)

 

XML.Clear

XML.clr

Clear all internal XML-Data and "undo" XML.-Parsing

 

 

Intention

 

This command is used to clear all internal XML-Data from a previously parsed XML-file and return the memory to the system.

During the loading/parsing of XML-Data, the SPR collects internal data-tables and flags to speed up the later commands.

 

XML.Clear

 

Deletes all collected Data and puts the SPR into the state right before parsing any XML-Data from new. It will also delete all Error-Messages, therefore you do not need to call

 

XML.Clear Error

 

explicitly after this command. If you load or parse a new XML-File, this command is transparently executed, therefore you do not need to call it before parsing an new XML-File.

 

In most cases, you do not need to call this command as its automatically called.

 

Even if the script ends, the robot will automatically free all memory automatically.

Therefore this command is not really needed in most cases.

 

 

 

Syntax

 

 

XML.Clear

 

 

Parameter Explanation

 

-

 

 

 

Example

 

'***********************************

' XML.Clear Sample

'***********************************

$$XMF=?pfad\Small_XML.txt

' We load the XML-Data into a Vaariable

CFF.$$XMF|$$XML

' Now we are going to parse it

XML.Parse|$$XML

'XML.Dump

' We check if there are errors

JIT.Lab_Err

 

' Now we clear the parsing.

XML.Clear

 

' We try an XML.-Command that will of course run into an error.

XML.get pos|$$POS

' We jump to the error-handler

JIT.Lab_Err

PRT.Actual Position after Parsing is: $$POS

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

MBX.!

'-----------------------------------------------------------

ENR.

: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

  lf - load file

  cle - clear error