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..Whitespace Character

Previous Top Next


MiniRobotLanguage (MRL)

 

IML./NML.Whitespace Character

IML./NML.wsc

Verify if a String contains only valid XML Whitespace characters

 

 

Intention

 

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

 

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

 

Here is an usage example:

 

$$XMF=  $crlf$SL-Name

NML.wsc|$$XMF

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

EIF.

 

 

 

Syntax

 

 

IML.Whitespace Character|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 Whitespace Characters

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

'

$$XMF=$sp$$crlf$

IML.wsc|$$XMF

 PRT.Yes it contains only valid XML-Whitespace characters.

EIF.

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

' Is a valid Name-Char at Position 4

$$XMF=SML _Name

IML.wsc|$$XMF|4

 PRT. It contains an valid character at position 4.

EIF.

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

$$XMF=   _Name

$$POS=4

NML.wsc|$$XMF|$$POS

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

EIF.

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

' Not a valid Name-Char at Position 3

$$POS=3

$$XMF=  $crlf$SL-Name

NML.wsc|$$XMF

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

EIF.

MBX.!

ENR.

 

This is the result of the 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

  wsa - Whitespace Asc