<< Click to Display Table of Contents >> Navigation: 3. Script Language > XML-Parser > IML./ NML. - no parse > XML-Parser * IML. / NML. |
MiniRobotLanguage (MRL)
IML.Name Char
IML.nsc
Check if XML-"Name"-Data complies with Standards
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.
As this is a String Command, no parsing is required before using this command.
Here is an usage example:
$$XMF=SML<_Name
NML.ncc|$$XMF
PRT.$$XMF is not a valid XML-Name.
PRT.It contains an invalid character at position $$000.
EIF.
Syntax
IML.Name Char|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 letter" then the position of the character is been placed on TOS (Top of Stack).
Example
'***********************************
' IML./NML. - Sample Script
'***********************************
' Valid Name
$$XMF=SML_Name
IML.ncc|$$XMF
PRT. $$XMF is a valid XML-Name
EIF.
PRT.----------------------
' Not a valid Name-Char at Position 4
$$XMF=SML<_Name
NML.ncc|$$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.ncc|$$XMF|$$POS
PRT. Character at Pos. $$POS is a a valid XML-Name Character
EIF.
PRT.----------------------
' Not a valid Name-Char at Position 3
$$POS=3
$$XMF=SL<_Name
NML.ncc|$$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 the sample script:
Remarks
-
Limitations:
-
See also:
• ! Smart Package Robot 's XML-Features
• XML. - eXtended Markup Language