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.Get Error

Previous Top Next


MiniRobotLanguage (MRL)

 

XML.Get Error

XML.geterr

Read internal Error flags to get informations about parsing Errors

 

 

Intention

 

This command is used to read all internal XML.-Error-Flags.

As the XML-Parser does not display Error-Messages, you need to use JIT. and this commands to find out about possible parsing problems.

 

It does only read Errors that happen during XML.-Parsing.

Usage is:

 

XML.Get Error|$$ERT

 

Typically it can be used during Error handling.

 

When loading or parsing a new XML-File, all Error Flags are automatically cleared.

 

Below is a complete example Script that shows Error handling.

 

 

 

Syntax

 

 

XML.Get Error|P2[|P3]

 

 

Parameter Explanation

 

P2 - Variable to return the Error-Messages that happened during the execution of an

         XML.-Command. Messages are stacked and collected until you use

    XML.Clear Error.

 

P3 - Variable to return a Error-Number. Currently not fully implemented.

 

 

 

Example

 

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

' XML.Get Error/Clear Error-Sample

'

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

$$XMF=?pfad\Small_XMLx.txt

' Now we are going to parse it

XML.Load File|$$XMF

' We check if there are errors

JIT.Lab_Err

:enx

MBX.!

ENR.

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

' Error Handler

:Lab_Err

' Get Error

XML.get error|$$ERT

PRT.$$ERT

' Clear Error

XML.cle

' Error is cleared

XML.get error|$$ERT

PRT. Error cleared! $$ERT

GTO.enx

ENR.

 

 

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

  ! SPR - XML-Parser Flags

  XML. - eXtended Markup Language

  par - parse from var

  cle - clear error