XML-Parser * IML. / NML.

<< Click to Display Table of Contents >>

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

XML-Parser * IML. / NML.

IML./NML.Name Start

Previous Top Next


MiniRobotLanguage (MRL)

 

IML.Name Start

IML.nsc

Verify if a String contains only valid XML Name-Start characters

 

 

Intention

 

This command is used to verify if a single character, or any character in P1 is a valid XML-Character to define a XML-Name Start Letter.

 

As this is a String Command, no parsing is required before using this command.

 

Here is an usage example:

 

$$XMF=SML<_Name

NML.nsc|$$XMF

 PRT.$$XMF is not a valid XML-Name Start letter.

 PRT.It contains an invalid character at position $$000.

EIF.

 

 

 

 

Syntax

 

 

IML.Name Start|P2[|P3]

 

 

Parameter Explanation

 

P2 - Variable with XML-Data. XML-Data can contain $cr, $lf or not.

 

P3 - (optional) Variable can contain a Position, then only the character at this position is been tested. If omitted or zero, all characters are tested. Only in this case, and if a character  is found that does not apply to the Standards for a "XML name start letter" then the position of the character is been placed on TOS (Top of Stack).

 

 

 

 

Example

 

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

' Valid Name Start Character(s)

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

$$XMF=SML_Name

IML.nsc|$$XMF

 PRT. $$XMF is a valid XML-Name

EIF.

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

' Not a valid Name-Char at Position 4

$$XMF=SML<_Name

NML.nsc|$$XMF

 PRT. $$XMF is not a valid XML-Name.$crlf$It contains an invalid character at position $$000.

EIF.

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

$$XMF=SML_Name

$$POS=4

IML.nsc|$$XMF|$$POS

 PRT. Character at Pos. $$POS is a valid XML-Name Character

EIF.

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

' Not a valid Name-Char at Position 3

$$POS=3

$$XMF=SL<_Name

NML.nsc|$$XMF|$$POS

 PRT. $$XMF is not a valid XML-Name.$crlf$It contains an invalid character at position $$POS.

EIF.

MBX.!

ENR.

 

This is the result of thios sample Script:

 

graphic

 

.

 

 

 

Remarks

 

As this is a String Command, no parsing is required before using this command.

 

 

 

Limitations:

 

-

 

 

See also:

 

  ! Smart Package Robot 's XML-Features

  ! SPR - XML-Parser Flags

  XML. - eXtended Markup Language

  par - parse from var