Parse

Load a string into the xxScreen Object (screen) and return the XML analysis of this string.

Constructor

var analyse = screen.Parse(string);
  •  string : String, a text of characters/spaces/carrige returns.


Return Values

String, containing an XML description of the analysed text.

 

Declaration of the XML description format

XML elementsDescriptions
screenRoot, Grouptag for a screen.
lineGrouptag for each line.
wGrouptag for one word (at least one character)
spGrouptag for spaces (at least one character)

 

 

XML attributesDescription
rRow number
cCurrent position per line
lLength of word or spaces section
pCurrent position of the selection (absolute)
formatValue of the word selection

 

 

Character interpretationDescription
Carriage ReturnCharacter, length 1, indicates end of line, no tag
TabCharacter, length 1, can be used as delimiter, no tag
SpaceCharacter, length 1, indicates a new word, tag: <sp>
WordCharacter, lengt >=1, tag: <w>

 

 

Example

Output of screen.Parse for example case from xxScreen example.

<screen rows="-1" cols="-1">
    <line r="1" c="1" p="1">
        <w format="GetClientTC" r="1" c="1" l="11" p="1"/>
        <sp r="1" c="12" l="1" p="12"/>
        <w format="Obtain" r="1" c="13" l="6" p="13"/>
        <sp r="1" c="19" l="1" p="19"/>
        <w format="the" r="1" c="20" l="3" p="20"/>
        <sp r="1" c="23" l="1" p="23"/>
        <w format="Transaction" r="1" c="24" l="11" p="24"/>
        <sp r="1" c="35" l="1" p="35"/>
        <w format="Control" r="1" c="36" l="7" p="36"/>
        <sp r="1" c="43" l="1" p="43"/>
        <w format="Data" r="1" c="44" l="4" p="44"/>
        <sp r="1" c="48" l="1" p="48"/>
        <w format="(XML)" r="1" c="49" l="5" p="49"/>
        <sp r="1" c="54" l="1" p="54"/>
        <w format="sent" r="1" c="55" l="4" p="55"/>
        <sp r="1" c="59" l="1" p="59"/>
        <w format="by" r="1" c="60" l="2" p="60"/>
        <sp r="1" c="62" l="1" p="62"/>
        <w format="client" r="1" c="63" l="6" p="63"/>
    </line>
    <line r="2" c="1" p="70">
        <w format="SetClientResponse" r="2" c="1" l="17" p="70"/>
        <sp r="2" c="18" l="1" p="87"/>
        <w format="Set" r="2" c="19" l="3" p="88"/>
        <sp r="2" c="22" l="1" p="91"/>
        <w format="the" r="2" c="23" l="3" p="92"/>
        <sp r="2" c="26" l="1" p="95"/>
        <w format="XML" r="2" c="27" l="3" p="96"/>
        <sp r="2" c="30" l="1" p="99"/>
        <w format="response" r="2" c="31" l="8" p="100"/>
        <sp r="2" c="39" l="1" p="108"/>
        <w format="to" r="2" c="40" l="2" p="109"/>
        <sp r="2" c="42" l="1" p="111"/>
        <w format="be" r="2" c="43" l="2" p="112"/>
        <sp r="2" c="45" l="1" p="114"/>
        <w format="returned" r="2" c="46" l="8" p="115"/>
        <sp r="2" c="54" l="1" p="123"/>
        <w format="to" r="2" c="55" l="2" p="124"/>
        <sp r="2" c="57" l="1" p="126"/>
        <w format="client" r="2" c="58" l="6" p="127"/>
    </line>
    <line r="3" c="1" p="134">
        <w format="SetClientResponseTC" r="3" c="1" l="19" p="134"/>
        <sp r="3" c="20" l="1" p="153"/>
        <w format="Set" r="3" c="21" l="3" p="154"/>
        <sp r="3" c="24" l="1" p="157"/>
        <w format="the" r="3" c="25" l="3" p="158"/>
        <sp r="3" c="28" l="1" p="161"/>
        <w format="Transaction" r="3" c="29" l="11" p="162"/>
        <sp r="3" c="40" l="1" p="173"/>
        <w format="Control" r="3" c="41" l="7" p="174"/>
        <sp r="3" c="48" l="1" p="181"/>
        <w format="Data" r="3" c="49" l="4" p="182"/>
        <sp r="3" c="53" l="1" p="186"/>
        <w format="(XML)" r="3" c="54" l="5" p="187"/>
        <sp r="3" c="59" l="1" p="192"/>
        <w format="to" r="3" c="60" l="2" p="193"/>
        <sp r="3" c="62" l="1" p="195"/>
        <w format="be" r="3" c="63" l="2" p="196"/>
        <sp r="3" c="65" l="1" p="198"/>
        <w format="returned" r="3" c="66" l="8" p="199"/>
        <sp r="3" c="74" l="1" p="207"/>
        <w format="to" r="3" c="75" l="2" p="208"/>
        <sp r="3" c="77" l="1" p="210"/>
        <w format="client" r="3" c="78" l="6" p="211"/>
    </line>
    <line r="4" c="1" p="218">
        <w format="SetErrorResponse" r="4" c="1" l="16" p="218"/>
        <sp r="4" c="17" l="1" p="234"/>
        <w format="Set" r="4" c="18" l="3" p="235"/>
        <sp r="4" c="21" l="1" p="238"/>
        <w format="a" r="4" c="22" l="1" p="239"/>
        <sp r="4" c="23" l="1" p="240"/>
        <w format="non-XML" r="4" c="24" l="7" p="241"/>
        <sp r="4" c="31" l="1" p="248"/>
        <w format="error" r="4" c="32" l="5" p="249"/>
        <sp r="4" c="37" l="1" p="254"/>
        <w format="response" r="4" c="38" l="8" p="255"/>
        <sp r="4" c="46" l="1" p="263"/>
        <w format="as" r="4" c="47" l="2" p="264"/>
        <sp r="4" c="49" l="1" p="266"/>
        <w format="transaction" r="4" c="50" l="11" p="267"/>
        <sp r="4" c="61" l="1" p="278"/>
        <w format="result" r="4" c="62" l="6" p="279"/>
        <sp r="4" c="68" l="1" p="285"/>
        <w format="that" r="4" c="69" l="4" p="286"/>
        <sp r="4" c="73" l="1" p="290"/>
        <w format="is" r="4" c="74" l="2" p="291"/>
        <sp r="4" c="76" l="1" p="293"/>
        <w format="returned" r="4" c="77" l="8" p="294"/>
        <sp r="4" c="85" l="1" p="302"/>
        <w format="to" r="4" c="86" l="2" p="303"/>
        <sp r="4" c="88" l="1" p="305"/>
        <w format="the" r="4" c="89" l="3" p="306"/>
        <sp r="4" c="92" l="1" p="309"/>
        <w format="client" r="4" c="93" l="6" p="310"/>
    </line>
    <line r="5" c="1" p="317">
        <w format="Decode" r="5" c="1" l="6" p="317"/>
        <sp r="5" c="7" l="1" p="323"/>
        <w format="Lookup" r="5" c="8" l="6" p="324"/>
        <sp r="5" c="14" l="1" p="330"/>
        <w format="a" r="5" c="15" l="1" p="331"/>
        <sp r="5" c="16" l="1" p="332"/>
        <w format="descriptive" r="5" c="17" l="11" p="333"/>
        <sp r="5" c="28" l="1" p="344"/>
        <w format="value" r="5" c="29" l="5" p="345"/>
        <sp r="5" c="34" l="1" p="350"/>
        <w format="by" r="5" c="35" l="2" p="351"/>
        <sp r="5" c="37" l="1" p="353"/>
        <w format="given" r="5" c="38" l="5" p="354"/>
        <sp r="5" c="43" l="1" p="359"/>
        <w format="code" r="5" c="44" l="4" p="360"/>
        <sp r="5" c="48" l="1" p="364"/>
        <w format="using" r="5" c="49" l="5" p="365"/>
        <sp r="5" c="54" l="1" p="370"/>
        <w format="XX/1" r="5" c="55" l="4" p="371"/>
    </line>
</screen>