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.Split Attrib

Previous Top Next


MiniRobotLanguage (MRL)

 

XML.Split Attrib

XML.spl

Split a String (Attribute) into "Name" and Value"

 

 

Intention

 

This command is used to easily split an attribute String into its components, name and value. This is a pure String-Operation and does not need a previous parsing.

 

'Usage is simple:

$$XMF=encoding="UTF-8?"

' We are going to split this in Name and Value

XML.Split Attrib|$$XMF|$$NAM

DBP.$$NAM--$$000

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

XML.Split Attrib|$$XMF|$$NAM|$$VAL

DBP.$$NAM--$$VAL

ENR.

 

 

 

Syntax

 

 

XML.spl|P2[|P3][|P4]

 

 

 

Parameter Explanation

 

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

 

P3 - Variable to return the result. The result is 0 in case

   

P4 - Variable to return the result value. If omitted this value is placed on

         TOS (Top of Stack).

 

 

 

Example

 

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

'  XML.-Split Attrib - Sample

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

$$XMF=encoding="UTF-8?"

' We are going to split this in Name and Value

XML.Split Attrib|$$XMF|$$NAM

DBP.$$NAM--$$000

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

XML.Split Attrib|$$XMF|$$NAM|$$VAL

DBP.$$NAM--$$VAL

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