XML-Parser * XML. (after Parse)

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > XML-Parser > XML. - after parse >

XML-Parser * XML. (after Parse)

XML.Get this Name

Previous Top Next


MiniRobotLanguage (MRL)

 

XML.Get this Name

XML.gtn

Get the name of the Tag at the actual position

 

 

Intention

 

This command is used to retrieve the Tag's name a t the actual position.

 

Here are two examples for Tag-Names:

 

' The name of this Tag is "Patch"

<Patch PatchName="SQLServer2">

 

' The name of this Tag is SP

<SP SPName='SP3'/>

 

Usage is simpe:

 

XML.gtn

PRT.Name is: $$000

 

or

 

XML.gtn|$$BAB|$$POS

PRT. The Tag name at position $$POS is $$BAB.

 

 

 

Syntax

 

 

XML.Get this Name[|P2][|P3]

 

 

 

Parameter Explanation

 

P2 - (optional) Variable to return the result. The result is the name of the Tag

          or "" if no name could be retrieved.

          If P2 is omitted, the result is been placed on TOS

 

P3 - (optional) numeric Byte  address of the XML-Data Byte that

          should be taken as position. If P3 is omitted, the actual position is taken instead.

 

 

 

Example

 

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

'

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

'

$$XMF=?pfad\SQ_XML.txt

NEF.$$XMF

 MBX.File $$XMF was not found!

 GTO.enx

EIF.

' Now we are going to parse it

XML.Load File|$$XMF

' We check if there are errors

JIT.Lab_Err

' We get the "actual position" - after parsing.

XML.get pos|$$POS

PRT.Actual Position after Parsing is: $$POS

' Hier gehts los

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

XML.sdn|&EXACT:Patch

XML.get pos|$$POS

PRT.Actual Position is: $$POS

XML.gtn

PRT.Name is here: $$000

XML.gse|$$BSA|$$BSE

PRT.Current Block starts at: $$BSA

PRT.Current Block ends at: $$BSE

XML.gtn|$$BAA|$$BSA

PRT. Using gtn on $$BSA -> $$BAA

XML.gtn|$$BAB|$$BSE

PRT. Using gtn on $$BSE -> $$BAB

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

PRT. We Dump Positions

XML.Dump|($$POS-3)|($$POS+3)

MBX.!

:enx

ENR.

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

' Error Handler

:Lab_Err

XML.get error|$$ERT

DBP.$$ERT

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

  par - parse from var