INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

A simple lesson in Arrays?

A simple lesson in Arrays?

(OP)


I am reading a XML file and can capture poid, poname and huid parameters easily but am struggling to catch the fourth parameter "suid" because it matches on "huid" at another random line in the file.

I have simplified the issue with the data shown below. The "...." in the example shown below are random number of lines.

CODE -->

poid=12		poname=fred 	huid=42
......
huid=51		suid=274
...
poid=09		poname=harry 	huid=84
....
huid=42		suid=189
......
huid=84		suid=2009
..
poid=27		poname=bert 	huid=51 

I want to get this output.

CODE -->

12	fred 	42	189
09	harry 	84  	2009
27	bert 	51	274 

As always, thanks in advance

Madasafish

RE: A simple lesson in Arrays?

(OP)
By the way I am using gawk

RE: A simple lesson in Arrays?

(OP)

If it helps....

CODE -->

# Third get POID, PO_NAME and HUID
gawk -F'" ' ' $0 !~ /productOfferingID/ { next }
        {
                split($1,a,"=\"")
                if (a[2] ~ /TWT137$|TWT171$|TWT160$|TWT167$|TWT141$|TWT168$|TWT148$|TWT40$|TWT9$|TWT10$|TWT170$|TWT177$|TWT28$|TWT166$|TWT225$|TWT61$/) {next}
                split($3,b,"=\"")
                split($7,c,"=")
                gsub(" ","_",b[2])
                gsub("\"","",c[2])

                print a[2],b[2],c[2]

        }' $POFILE 

RE: A simple lesson in Arrays?

(OP)
I appreciate I will have to take "$0 !~ /productOfferingID/ { next }" out of the code to get to the "suid" lines.

Madasafish

RE: A simple lesson in Arrays?

(OP)
I appreciate your help with this PHV

RE: A simple lesson in Arrays?

I tried this:

CODE

# Run: awk -f madasafish2.awk madasafish_file2.txt
BEGIN {
  FS=" "
  j = 0
}

{ 
  if (split($1, tmp_array, "=") == 2) {
    key = tmp_array[02]
    if (NF == 2) {
       if (split($2, tmp_array, "=") == 2) {
          suid = tmp_array[02]
          #
          #print key " --> " suid
          j++
          keys[j] = key
          values[key] = suid
       }
    }
    else if (NF == 3) { 
       if (split($2, tmp_array, "=") == 2) {
          poname = tmp_array[02]
          if (split($3, tmp_array, "=") == 2) {
             huid = tmp_array[02]
             #
             #print key " --> " poname ", " huid
             j++
             keys[j] = key
             values[key] = poname "," huid
          }
       }  
    }
  }  
}

END {
  n = j
  for (j=0; j <= n; j++) {
    key = keys[j]
    value = values[key]
    if (split(value, tmp_array, ",") == 2) {
      poname = tmp_array[1]
      huid = tmp_array[2]
      suid = values[huid]
      printf "%s    %-10s  %s    %s\n", key, poname, huid, suid
    }
  }
} 

The script delivers for this file

CODE

poid=12		poname=fred 	huid=42
......
huid=51		suid=274
...
poid=09		poname=harry 	huid=84
....
huid=42		suid=189
......
huid=84		suid=2009
..
poid=27		poname=bert 	huid=51 
this output:

CODE

$ awk -f madasafish2.awk madasafish_file2.txt
12    fred        42    189
09    harry       84    2009
27    bert        51    274 

RE: A simple lesson in Arrays?

(OP)
Yikes!....I was under the impression this was simple and was looking for the technique and was expecting a slight change and a couple of lines extra, which was why I simplified it so that it is easier for the readers to understand. Is it really that complicated?. It would be simpler to parse the file again to pick up the suid. Not that I am un-appreciative of Mikom's answer, thank-you Mikom.

Has my attempt to simplify it complicated it?

Here is the data...

Please note that "Space hierarchyUID" is suid in my simplified version

CODE -->

<?xml version="1.0" encoding="UTF-8"?>
<EntryListAction>
   <ControlArea>
      <Action>
         <Verb>SHOWLIST</Verb>
         <Noun>ENTRY</Noun>
         <ActionCode>144012</ActionCode>
         <AttributeName>stb_list_entry</AttributeName>
      </Action>
      <StatusInfo>
         <Status>SUCCESS</Status>
      </StatusInfo>
   </ControlArea>
   <DataArea>
      <ListOfEntry>
         <Folder hierarchyUID="TWT2007554" localEntryUID="TWT2007554" entryName="NOV12 v1.5.1" entryType="1" sequence="0" parentHUID="H0" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="false" folderType="1" linkType="1" linkTargetHUID=""/>
         <RVOD productOfferingID="TWT148" productOfferingType="1" productOfferingName="On Demand" activeViewHUID="TWT1352247" status="2" rating="U" hierarchyUID="TWT1352245" parentHUID="H0" parentEntryType="1" productOfferingSequence="1" localEntryUID="TWT148" entryName="On Demand" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4">
            <Description>For On Demand key, PO to allow determination of HUID</Description>
            <View hierarchyUID="TWT1352247" localEntryUID="TWT1352247" entryName="On Demand view" entryType="1" sequence="0" parentHUID="TWT1352245" parentEntryType="2" productOfferingUID="TWT148" productOfferingHUID="TWT1352245" isManual="false" isInvisible="false" entryCount="0" folderCount="1" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1352246" localEntryUID="TWT1352246" entryName="Space" entryType="1" sequence="1" parentHUID="TWT1352245" parentEntryType="2" productOfferingUID="TWT148" productOfferingHUID="TWT1352245" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID="" displayMode="1"/>
         </RVOD>
         <Folder hierarchyUID="TWT1956087" localEntryUID="TWT1956087" entryName="TiVo" entryType="1" sequence="3" parentHUID="H0" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="1" isLastDepth="false" folderType="1" linkType="1" linkTargetHUID="">
            <Folder hierarchyUID="TWT1956098" localEntryUID="TWT1956098" entryName="Current Rentals" entryType="1" sequence="1" parentHUID="TWT1956087" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="1" isLastDepth="true" folderType="1" linkType="1" linkTargetHUID=""/>
            <SVOD productOfferingID="TWT225" productOfferingType="2" productOfferingName="BBC iPlayer~D9" activeViewHUID="TWT1959074" status="2" rating="U" hierarchyUID="TWT1959072" parentHUID="TWT1956087" parentEntryType="1" productOfferingSequence="2" localEntryUID="TWT225" entryName="BBC iPlayer~D9" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
               <Description>~D9</Description>
            </SVOD>
         </Folder>
         <SVOD productOfferingID="TWT61" productOfferingType="2" productOfferingName="Teleport Replay" activeViewHUID="TWT1052475" status="2" rating="U" hierarchyUID="TWT1040878" parentHUID="H0" parentEntryType="1" productOfferingSequence="10" localEntryUID="TWT61" entryName="Teleport Replay" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
            <Description>Teleport Replay~D9</Description>
            <View hierarchyUID="TWT1052475" localEntryUID="TWT1052475" entryName="Catch Up TV On Demand~D9" entryType="1" sequence="1" parentHUID="TWT1040878" parentEntryType="2" productOfferingUID="TWT61" productOfferingHUID="TWT1040878" isManual="false" isInvisible="false" entryCount="0" folderCount="5" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1040879" localEntryUID="TWT1040879" entryName="Teleport Replay Space" entryType="1" sequence="1" parentHUID="TWT1040878" parentEntryType="2" productOfferingUID="TWT61" productOfferingHUID="TWT1040878" isManual="false" isInvisible="false" entryCount="0" folderCount="7" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT261" productOfferingType="2" productOfferingName="TiVo Replay" activeViewHUID="TWT2151975" status="2" rating="U" hierarchyUID="TWT2151861" parentHUID="H0" parentEntryType="1" productOfferingSequence="12" localEntryUID="TWT261" entryName="TiVo Replay" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
            <Description>TiVo Replay~D9</Description>
            <View hierarchyUID="TWT2151975" localEntryUID="TWT2151975" entryName="Catch Up TV On Demand~D9" entryType="1" sequence="1" parentHUID="TWT2151861" parentEntryType="2" productOfferingUID="TWT261" productOfferingHUID="TWT2151861" isManual="false" isInvisible="false" entryCount="0" folderCount="5" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2151862" localEntryUID="TWT2151862" entryName="TiVo Replay Space" entryType="1" sequence="1" parentHUID="TWT2151861" parentEntryType="2" productOfferingUID="TWT261" productOfferingHUID="TWT2151861" isManual="false" isInvisible="false" entryCount="0" folderCount="7" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </SVOD>
         <RVOD productOfferingID="TWT219" productOfferingType="1" productOfferingName="Sneak Peeks" activeViewHUID="TWT1915849" status="2" rating="U" hierarchyUID="TWT1915847" parentHUID="H0" parentEntryType="1" productOfferingSequence="14" localEntryUID="TWT219" entryName="Sneak Peeks" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4">
            <Description>~D9</Description>
            <View hierarchyUID="TWT1915849" localEntryUID="TWT1915849" entryName="Sneak Peeks~D0" entryType="1" sequence="1" parentHUID="TWT1915847" parentEntryType="2" productOfferingUID="TWT219" productOfferingHUID="TWT1915847" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1915848" localEntryUID="TWT1915848" entryName="Sneak Peeks Space" entryType="1" sequence="2" parentHUID="TWT1915847" parentEntryType="2" productOfferingUID="TWT219" productOfferingHUID="TWT1915847" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </RVOD>
         <SVOD productOfferingID="TWT263" productOfferingType="2" productOfferingName="Teleport TV XL" activeViewHUID="TWT2206553" status="2" rating="U" hierarchyUID="TWT12872" parentHUID="H0" parentEntryType="1" productOfferingSequence="20" localEntryUID="TWT263" entryName="Teleport TV XL" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000000001" suspendlistLivetime="0">
            <Description>TV for XL~E2~D7</Description>
            <View hierarchyUID="TWT2206553" localEntryUID="TWT2206553" entryName="TV for XL~E2~D7" entryType="1" sequence="1" parentHUID="TWT12872" parentEntryType="2" productOfferingUID="TWT263" productOfferingHUID="TWT12872" isManual="false" isInvisible="false" entryCount="0" folderCount="6" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT12873" localEntryUID="TWT12873" entryName="Teleport TV XL Space" entryType="1" sequence="99" parentHUID="TWT12872" parentEntryType="2" productOfferingUID="TWT263" productOfferingHUID="TWT12872" isManual="false" isInvisible="false" entryCount="1234" folderCount="1" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT262" productOfferingType="2" productOfferingName="Teleport TV L" activeViewHUID="TWT2206744" status="2" rating="U" hierarchyUID="TWT2201455" parentHUID="H0" parentEntryType="1" productOfferingSequence="30" localEntryUID="TWT262" entryName="Teleport TV L" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000000101" suspendlistLivetime="0">
            <Description>TV for L~E5~D7</Description>
            <View hierarchyUID="TWT2206744" localEntryUID="TWT2206744" entryName="TV for L~E5~D7" entryType="1" sequence="0" parentHUID="TWT2201455" parentEntryType="2" productOfferingUID="TWT262" productOfferingHUID="TWT2201455" isManual="false" isInvisible="false" entryCount="0" folderCount="8" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2201456" localEntryUID="TWT2201456" entryName="Teleport TV L Space" entryType="1" sequence="99" parentHUID="TWT2201455" parentEntryType="2" productOfferingUID="TWT262" productOfferingHUID="TWT2201455" isManual="false" isInvisible="false" entryCount="243" folderCount="1" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT306" productOfferingType="2" productOfferingName="Teleport TV M+" activeViewHUID="TWT2267793" status="2" rating="U" hierarchyUID="TWT2267561" parentHUID="H0" parentEntryType="1" productOfferingSequence="40" localEntryUID="TWT306" entryName="Teleport TV M+" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000000201" suspendlistLivetime="0">
            <Description>TV  for M+~D7</Description>
            <View hierarchyUID="TWT2267793" localEntryUID="TWT2267793" entryName="TV For M+~E10~D7" entryType="1" sequence="1" parentHUID="TWT2267561" parentEntryType="2" productOfferingUID="TWT306" productOfferingHUID="TWT2267561" isManual="false" isInvisible="false" entryCount="0" folderCount="8" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2267562" localEntryUID="TWT2267562" entryName="Teleport TV M+ Space" entryType="1" sequence="2" parentHUID="TWT2267561" parentEntryType="2" productOfferingUID="TWT306" productOfferingHUID="TWT2267561" isManual="false" isInvisible="false" entryCount="112" folderCount="1" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT325" productOfferingType="2" productOfferingName="Teleport TV M+ Plus" activeViewHUID="TWT2275879" status="2" rating="U" hierarchyUID="TWT2275877" parentHUID="H0" parentEntryType="1" productOfferingSequence="42" localEntryUID="TWT325" entryName="Teleport TV M+ Plus" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000003001" suspendlistLivetime="0">
            <View hierarchyUID="TWT2275879" localEntryUID="TWT2275879" entryName="TV for M+ Plus~D7" entryType="1" sequence="1" parentHUID="TWT2275877" parentEntryType="2" productOfferingUID="TWT325" productOfferingHUID="TWT2275877" isManual="false" isInvisible="false" entryCount="0" folderCount="4" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2275878" localEntryUID="TWT2275878" entryName="Teleport TV M+ Plus Space" entryType="1" sequence="2" parentHUID="TWT2275877" parentEntryType="2" productOfferingUID="TWT325" productOfferingHUID="TWT2275877" isManual="false" isInvisible="false" entryCount="112" folderCount="1" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT319" productOfferingType="2" productOfferingName="Teleport TV Free" activeViewHUID="TWT2271964" status="2" rating="U" hierarchyUID="TWT2271962" parentHUID="H0" parentEntryType="1" productOfferingSequence="45" localEntryUID="TWT319" entryName="Teleport TV Free" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
            <Description>Hidden PO for TiVo Apps</Description>
            <View hierarchyUID="TWT2271964" localEntryUID="TWT2271964" entryName="Star Trek" entryType="1" sequence="0" parentHUID="TWT2271962" parentEntryType="2" productOfferingUID="TWT319" productOfferingHUID="TWT2271962" isManual="false" isInvisible="false" entryCount="5" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2271963" localEntryUID="TWT2271963" entryName="Teleport TV Free Space" entryType="1" sequence="1" parentHUID="TWT2271962" parentEntryType="2" productOfferingUID="TWT319" productOfferingHUID="TWT2271962" isManual="false" isInvisible="false" entryCount="0" folderCount="1" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </SVOD>
         <RVOD productOfferingID="TWT20" productOfferingType="1" productOfferingName="Teleport Movies" activeViewHUID="TWT333" status="2" rating="U" hierarchyUID="TWT331" parentHUID="H0" parentEntryType="1" productOfferingSequence="50" localEntryUID="TWT20" entryName="Teleport Movies" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="2">
            <Description>Teleport Movies Product offering~P1</Description>
            <View hierarchyUID="TWT1266528" localEntryUID="TWT1266528" entryName="FilmFlex Movies HD~T2" entryType="1" sequence="0" parentHUID="TWT331" parentEntryType="2" productOfferingUID="TWT20" productOfferingHUID="TWT331" isManual="false" isInvisible="false" entryCount="42" folderCount="9" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <View hierarchyUID="TWT333" localEntryUID="TWT333" entryName="Movies On Demand~P1" entryType="1" sequence="1" parentHUID="TWT331" parentEntryType="2" productOfferingUID="TWT20" productOfferingHUID="TWT331" isManual="false" isInvisible="false" entryCount="0" folderCount="5" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT332" localEntryUID="TWT332" entryName="Movies On Demand Space" entryType="1" sequence="2" parentHUID="TWT331" parentEntryType="2" productOfferingUID="TWT20" productOfferingHUID="TWT331" isManual="false" isInvisible="false" entryCount="0" folderCount="5" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </RVOD>
         <SVOD productOfferingID="TWT13" productOfferingType="2" productOfferingName="3D for XL" activeViewHUID="TWT2013726" status="2" rating="U" hierarchyUID="TWT2013724" parentHUID="H0" parentEntryType="1" productOfferingSequence="52" localEntryUID="TWT13" entryName="3D for XL" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000000001" suspendlistLivetime="0">
            <Description>3D Content only available to XL customers~E2</Description>
            <View hierarchyUID="TWT2013726" localEntryUID="TWT2013726" entryName="Exclusive 3D for XL Customers~E2" entryType="1" sequence="1" parentHUID="TWT2013724" parentEntryType="2" productOfferingUID="TWT13" productOfferingHUID="TWT2013724" isManual="false" isInvisible="false" entryCount="1" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <View hierarchyUID="TWT2230755" localEntryUID="TWT2230755" entryName="Eurosport 3D~E2" entryType="1" sequence="2" parentHUID="TWT2013724" parentEntryType="2" productOfferingUID="TWT13" productOfferingHUID="TWT2013724" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <View hierarchyUID="TWT2237287" localEntryUID="TWT2237287" entryName="Discovery 3D~E2" entryType="1" sequence="3" parentHUID="TWT2013724" parentEntryType="2" productOfferingUID="TWT13" productOfferingHUID="TWT2013724" isManual="false" isInvisible="false" entryCount="19" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2013725" localEntryUID="TWT2013725" entryName="3D for XL Space" entryType="1" sequence="99" parentHUID="TWT2013724" parentEntryType="2" productOfferingUID="TWT13" productOfferingHUID="TWT2013724" isManual="false" isInvisible="false" entryCount="20" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT287" productOfferingType="2" productOfferingName="Sky Movies" activeViewHUID="TWT2236937" status="2" rating="U" hierarchyUID="TWT2236935" parentHUID="H0" parentEntryType="1" productOfferingSequence="54" localEntryUID="TWT287" entryName="Sky Movies" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="2" packageID="SVOD00000001001" suspendlistLivetime="0">
            <Description>Sky Movies, SD content only~E6~D8~P0</Description>
            <View hierarchyUID="TWT2236937" localEntryUID="TWT2236937" entryName="Sky Movies~E6~D8~P0" entryType="1" sequence="0" parentHUID="TWT2236935" parentEntryType="2" productOfferingUID="TWT287" productOfferingHUID="TWT2236935" isManual="false" isInvisible="false" entryCount="0" folderCount="11" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2236936" localEntryUID="TWT2236936" entryName="Sky Movies Space" entryType="1" sequence="1" parentHUID="TWT2236935" parentEntryType="2" productOfferingUID="TWT287" productOfferingHUID="TWT2236935" isManual="false" isInvisible="false" entryCount="641" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT303" productOfferingType="2" productOfferingName="Sky Movies HD" activeViewHUID="TWT2256643" status="2" rating="U" hierarchyUID="TWT2256641" parentHUID="H0" parentEntryType="1" productOfferingSequence="55" localEntryUID="TWT303" entryName="Sky Movies HD" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000001002" suspendlistLivetime="0">
            <Description>Sky Movies MPEG 4 HD content, TiVo only~E7~D8</Description>
            <View hierarchyUID="TWT2256643" localEntryUID="TWT2256643" entryName="HD~E7~K0~D8" entryType="1" sequence="1" parentHUID="TWT2256641" parentEntryType="2" productOfferingUID="TWT303" productOfferingHUID="TWT2256641" isManual="false" isInvisible="false" entryCount="0" folderCount="11" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2256642" localEntryUID="TWT2256642" entryName="Sky Movies HD Space" entryType="1" sequence="9" parentHUID="TWT2256641" parentEntryType="2" productOfferingUID="TWT303" productOfferingHUID="TWT2256641" isManual="false" isInvisible="false" entryCount="415" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT203" productOfferingType="2" productOfferingName="PictureBox" activeViewHUID="TWT1846243" status="2" rating="U" hierarchyUID="TWT1844078" parentHUID="H0" parentEntryType="1" productOfferingSequence="56" localEntryUID="TWT203" entryName="PictureBox" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="2" packageID="SVOD00000000003" suspendlistLivetime="0">
            <Description>~P7~E3~D6</Description>
            <View hierarchyUID="TWT1846243" localEntryUID="TWT1846243" entryName="PictureBox~P7~E3~D6" entryType="1" sequence="2" parentHUID="TWT1844078" parentEntryType="2" productOfferingUID="TWT203" productOfferingHUID="TWT1844078" isManual="false" isInvisible="false" entryCount="0" folderCount="8" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1844079" localEntryUID="TWT1844079" entryName="PictureBox Space" entryType="1" sequence="99" parentHUID="TWT1844078" parentEntryType="2" productOfferingUID="TWT203" productOfferingHUID="TWT1844078" isManual="false" isInvisible="false" entryCount="114" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <RVOD productOfferingID="TWT137" productOfferingType="1" productOfferingName="RVOD Music" activeViewHUID="TWT1271402" status="2" rating="U" hierarchyUID="TWT1271398" parentHUID="H0" parentEntryType="1" productOfferingSequence="60" localEntryUID="TWT137" entryName="RVOD Music" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="3">
            <Description>Pay Per Track Music~P2~E1~D3</Description>
            <View hierarchyUID="TWT1271402" localEntryUID="TWT1271402" entryName="Music On Demand~P2~E1~D3" entryType="1" sequence="0" parentHUID="TWT1271398" parentEntryType="2" productOfferingUID="TWT137" productOfferingHUID="TWT1271398" isManual="false" isInvisible="false" entryCount="1" folderCount="8" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1271399" localEntryUID="TWT1271399" entryName="RVOD Music Space" entryType="1" sequence="1" parentHUID="TWT1271398" parentEntryType="2" productOfferingUID="TWT137" productOfferingHUID="TWT1271398" isManual="false" isInvisible="false" entryCount="5396" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
            <View hierarchyUID="TWT2271266" localEntryUID="TWT2271266" entryName="Hidden Views" entryType="1" sequence="99" parentHUID="TWT1271398" parentEntryType="2" productOfferingUID="TWT137" productOfferingHUID="TWT1271398" isManual="false" isInvisible="false" entryCount="0" folderCount="7" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
         </RVOD>
         <SVOD productOfferingID="TWT167" productOfferingType="2" productOfferingName="SVOD Music" activeViewHUID="TWT1551375" status="2" rating="U" hierarchyUID="TWT1551373" parentHUID="H0" parentEntryType="1" productOfferingSequence="61" localEntryUID="TWT167" entryName="SVOD Music" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="3" packageID="SVOD00000003001" suspendlistLivetime="0">
            <Description>Subscription Music~P2~E0~D5</Description>
            <View hierarchyUID="TWT1551375" localEntryUID="TWT1551375" entryName="Music On Demand~P2~E0~D5" entryType="1" sequence="0" parentHUID="TWT1551373" parentEntryType="2" productOfferingUID="TWT167" productOfferingHUID="TWT1551373" isManual="false" isInvisible="false" entryCount="1" folderCount="7" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1551374" localEntryUID="TWT1551374" entryName="SVOD Music Space" entryType="1" sequence="1" parentHUID="TWT1551373" parentEntryType="2" productOfferingUID="TWT167" productOfferingHUID="TWT1551373" isManual="false" isInvisible="false" entryCount="5340" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <RVOD productOfferingID="TWT171" productOfferingType="1" productOfferingName="RVOD Playlists" activeViewHUID="TWT1717072" status="2" rating="U" hierarchyUID="TWT1717068" parentHUID="H0" parentEntryType="1" productOfferingSequence="62" localEntryUID="TWT171" entryName="RVOD Playlists" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="3">
            <Description>RVOD playlists~D0</Description>
            <View hierarchyUID="TWT1717072" localEntryUID="TWT1717072" entryName="RVOD Playlists~D0" entryType="1" sequence="0" parentHUID="TWT1717068" parentEntryType="2" productOfferingUID="TWT171" productOfferingHUID="TWT1717068" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1717069" localEntryUID="TWT1717069" entryName="RVOD Playlists Space" entryType="1" sequence="1" parentHUID="TWT1717068" parentEntryType="2" productOfferingUID="TWT171" productOfferingHUID="TWT1717068" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </RVOD>
         <SVOD productOfferingID="TWT141" productOfferingType="2" productOfferingName="SVOD Playlists" activeViewHUID="TWT1301625" status="2" rating="U" hierarchyUID="TWT1301623" parentHUID="H0" parentEntryType="1" productOfferingSequence="63" localEntryUID="TWT141" entryName="SVOD Playlists" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="3" packageID="SVOD00000003001" suspendlistLivetime="0">
            <Description>~P2~C10~D1</Description>
            <View hierarchyUID="TWT1301625" localEntryUID="TWT1301625" entryName="SVOD Playlists~P2~C10~D1" entryType="1" sequence="0" parentHUID="TWT1301623" parentEntryType="2" productOfferingUID="TWT141" productOfferingHUID="TWT1301623" isManual="false" isInvisible="false" entryCount="35" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1301624" localEntryUID="TWT1301624" entryName="SVOD Playlists Space" entryType="1" sequence="1" parentHUID="TWT1301623" parentEntryType="2" productOfferingUID="TWT141" productOfferingHUID="TWT1301623" isManual="false" isInvisible="false" entryCount="35" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
            <View hierarchyUID="TWT2271056" localEntryUID="TWT2271056" entryName="Hidden Views" entryType="1" sequence="10" parentHUID="TWT1301623" parentEntryType="2" productOfferingUID="TWT141" productOfferingHUID="TWT1301623" isManual="false" isInvisible="false" entryCount="0" folderCount="7" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
         </SVOD>
         <RVOD productOfferingID="TWT160" productOfferingType="1" productOfferingName="RVOD Karaoke" activeViewHUID="TWT1444848" status="2" rating="U" hierarchyUID="TWT1444846" parentHUID="H0" parentEntryType="1" productOfferingSequence="64" localEntryUID="TWT160" entryName="RVOD Karaoke" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="3">
            <Description>~P2</Description>
            <View hierarchyUID="TWT1444848" localEntryUID="TWT1444848" entryName="Karaoke~P2" entryType="1" sequence="0" parentHUID="TWT1444846" parentEntryType="2" productOfferingUID="TWT160" productOfferingHUID="TWT1444846" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1444847" localEntryUID="TWT1444847" entryName="RVOD Karaoke Space" entryType="1" sequence="1" parentHUID="TWT1444846" parentEntryType="2" productOfferingUID="TWT160" productOfferingHUID="TWT1444846" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </RVOD>
         <SVOD productOfferingID="TWT168" productOfferingType="2" productOfferingName="SVOD Karaoke" activeViewHUID="TWT1572672" status="2" rating="U" hierarchyUID="TWT1572670" parentHUID="H0" parentEntryType="1" productOfferingSequence="65" localEntryUID="TWT168" entryName="SVOD Karaoke" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="3" packageID="SVOD00000003001" suspendlistLivetime="0">
            <Description>~P2</Description>
            <View hierarchyUID="TWT1572672" localEntryUID="TWT1572672" entryName="Karaoke~P2" entryType="1" sequence="0" parentHUID="TWT1572670" parentEntryType="2" productOfferingUID="TWT168" productOfferingHUID="TWT1572670" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1572671" localEntryUID="TWT1572671" entryName="SVOD Karaoke Space" entryType="1" sequence="1" parentHUID="TWT1572670" parentEntryType="2" productOfferingUID="TWT168" productOfferingHUID="TWT1572670" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </SVOD>
         <RVOD productOfferingID="TWT305" productOfferingType="1" productOfferingName="Sports" activeViewHUID="TWT2267537" status="2" rating="U" hierarchyUID="TWT2267535" parentHUID="H0" parentEntryType="1" productOfferingSequence="70" localEntryUID="TWT305" entryName="Sports" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4">
            <Description>Sports Listing</Description>
            <View hierarchyUID="TWT2267537" localEntryUID="TWT2267537" entryName="Sports" entryType="1" sequence="1" parentHUID="TWT2267535" parentEntryType="2" productOfferingUID="TWT305" productOfferingHUID="TWT2267535" isManual="false" isInvisible="false" entryCount="0" folderCount="2" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2267536" localEntryUID="TWT2267536" entryName="Sports Space" entryType="1" sequence="2" parentHUID="TWT2267535" parentEntryType="2" productOfferingUID="TWT305" productOfferingHUID="TWT2267535" isManual="false" isInvisible="false" entryCount="119" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </RVOD>
         <SVOD productOfferingID="TWT302" productOfferingType="2" productOfferingName="Sky Sports" activeViewHUID="TWT2255733" status="2" rating="U" hierarchyUID="TWT2255731" parentHUID="H0" parentEntryType="1" productOfferingSequence="72" localEntryUID="TWT302" entryName="Sky Sports" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000001003" suspendlistLivetime="0">
            <Description>Sky Sports, SD content only~E8~D8</Description>
            <View hierarchyUID="TWT2255733" localEntryUID="TWT2255733" entryName="Sky Sports~E8~D8" entryType="1" sequence="1" parentHUID="TWT2255731" parentEntryType="2" productOfferingUID="TWT302" productOfferingHUID="TWT2255731" isManual="false" isInvisible="false" entryCount="0" folderCount="9" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2255732" localEntryUID="TWT2255732" entryName="Sky Sports space" entryType="1" sequence="9" parentHUID="TWT2255731" parentEntryType="2" productOfferingUID="TWT302" productOfferingHUID="TWT2255731" isManual="false" isInvisible="false" entryCount="393" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT304" productOfferingType="2" productOfferingName="Sky Sports HD" activeViewHUID="TWT2258988" status="2" rating="U" hierarchyUID="TWT2258986" parentHUID="H0" parentEntryType="1" productOfferingSequence="73" localEntryUID="TWT304" entryName="Sky Sports HD" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000001004" suspendlistLivetime="0">
            <Description>Sky Sports MPEG 4 HD content, TiVo only~E7~D8</Description>
            <View hierarchyUID="TWT2258988" localEntryUID="TWT2258988" entryName="HD~E9~K0~D8" entryType="1" sequence="1" parentHUID="TWT2258986" parentEntryType="2" productOfferingUID="TWT304" productOfferingHUID="TWT2258986" isManual="false" isInvisible="false" entryCount="20" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2258987" localEntryUID="TWT2258987" entryName="Sky Sports HD Space" entryType="1" sequence="9" parentHUID="TWT2258986" parentEntryType="2" productOfferingUID="TWT304" productOfferingHUID="TWT2258986" isManual="false" isInvisible="false" entryCount="20" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT307" productOfferingType="2" productOfferingName="ESPN" activeViewHUID="TWT2270272" status="2" rating="U" hierarchyUID="TWT2270270" parentHUID="H0" parentEntryType="1" productOfferingSequence="74" localEntryUID="TWT307" entryName="ESPN" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="SVOD00000002001" suspendlistLivetime="0">
            <Description>~E11</Description>
            <View hierarchyUID="TWT2270272" localEntryUID="TWT2270272" entryName="ESPN~E11~D8" entryType="1" sequence="0" parentHUID="TWT2270270" parentEntryType="2" productOfferingUID="TWT307" productOfferingHUID="TWT2270270" isManual="false" isInvisible="false" entryCount="0" folderCount="3" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT2270271" localEntryUID="TWT2270271" entryName="ESPN Space" entryType="1" sequence="1" parentHUID="TWT2270270" parentEntryType="2" productOfferingUID="TWT307" productOfferingHUID="TWT2270270" isManual="false" isInvisible="false" entryCount="5" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <RVOD productOfferingID="TWT40" productOfferingType="1" productOfferingName="Teleport Life" activeViewHUID="TWT79879" status="2" rating="U" hierarchyUID="TWT79876" parentHUID="H0" parentEntryType="1" productOfferingSequence="80" localEntryUID="TWT40" entryName="Teleport Life" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4">
            <Description>Adult and Hi Def</Description>
            <View hierarchyUID="TWT79879" localEntryUID="TWT79879" entryName="Pay Per View" entryType="1" sequence="1" parentHUID="TWT79876" parentEntryType="2" productOfferingUID="TWT40" productOfferingHUID="TWT79876" isManual="false" isInvisible="false" entryCount="0" folderCount="2" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT79877" localEntryUID="TWT79877" entryName="Teleport Life Space" entryType="1" sequence="1" parentHUID="TWT79876" parentEntryType="2" productOfferingUID="TWT40" productOfferingHUID="TWT79876" isManual="false" isInvisible="false" entryCount="47" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </RVOD>
         <RVOD productOfferingID="TWT28" productOfferingType="1" productOfferingName="Adult" activeViewHUID="TWT12788" status="2" rating="U" hierarchyUID="TWT12784" parentHUID="H0" parentEntryType="1" productOfferingSequence="82" localEntryUID="TWT28" entryName="Adult" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="1">
            <Description>Test Adult Description~P3~S11</Description>
            <View hierarchyUID="TWT12788" localEntryUID="TWT12788" entryName="Adult~P3~S11" entryType="1" sequence="0" parentHUID="TWT12784" parentEntryType="2" productOfferingUID="TWT28" productOfferingHUID="TWT12784" isManual="false" isInvisible="false" entryCount="0" folderCount="8" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT12785" localEntryUID="TWT12785" entryName="Adult space" entryType="1" sequence="1" parentHUID="TWT12784" parentEntryType="2" productOfferingUID="TWT28" productOfferingHUID="TWT12784" isManual="false" isInvisible="false" entryCount="526" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </RVOD>
         <Folder hierarchyUID="TWT1194187" localEntryUID="TWT1194187" entryName="High Definition" entryType="1" sequence="84" parentHUID="H0" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="false" folderType="1" linkType="1" linkTargetHUID="">
            <SVOD productOfferingID="TWT103" productOfferingType="2" productOfferingName="HD Programmes" activeViewHUID="TWT1194195" status="2" rating="U" hierarchyUID="TWT1194190" parentHUID="TWT1194187" parentEntryType="1" productOfferingSequence="1" localEntryUID="TWT103" entryName="HD Programmes" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="notinlist" suspendlistLivetime="0">
               <Description>HD SVOD Content</Description>
            </SVOD>
         </Folder>
         <SVOD productOfferingID="TWT173" productOfferingType="2" productOfferingName="More Free" activeViewHUID="TWT1864960" status="2" rating="U" hierarchyUID="TWT1763119" parentHUID="H0" parentEntryType="1" productOfferingSequence="86" localEntryUID="TWT173" entryName="More Free" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
            <View hierarchyUID="TWT1864960" localEntryUID="TWT1864960" entryName="ITV" entryType="1" sequence="3" parentHUID="TWT1763119" parentEntryType="2" productOfferingUID="TWT173" productOfferingHUID="TWT1763119" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1763120" localEntryUID="TWT1763120" entryName="More Free Space" entryType="1" sequence="10" parentHUID="TWT1763119" parentEntryType="2" productOfferingUID="TWT173" productOfferingHUID="TWT1763119" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT161" productOfferingType="2" productOfferingName="Virgin Central" activeViewHUID="TWT1454835" status="2" rating="U" hierarchyUID="TWT1454833" parentHUID="H0" parentEntryType="1" productOfferingSequence="90" localEntryUID="TWT161" entryName="Virgin Central" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
            <Description>Only accessible via ETV trigger. Rename as "Virgin Central PPV" when changing to RVOD.~D6</Description>
            <View hierarchyUID="TWT1454835" localEntryUID="TWT1454835" entryName="Virgin Central~D6" entryType="1" sequence="0" parentHUID="TWT1454833" parentEntryType="2" productOfferingUID="TWT161" productOfferingHUID="TWT1454833" isManual="false" isInvisible="false" entryCount="10" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1454834" localEntryUID="TWT1454834" entryName="Virgin Central Space" entryType="1" sequence="1" parentHUID="TWT1454833" parentEntryType="2" productOfferingUID="TWT161" productOfferingHUID="TWT1454833" isManual="false" isInvisible="false" entryCount="10" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT166" productOfferingType="2" productOfferingName="BBC iPlayer" activeViewHUID="TWT1510201" status="2" rating="U" hierarchyUID="TWT1510199" parentHUID="H0" parentEntryType="1" productOfferingSequence="95" localEntryUID="TWT166" entryName="BBC iPlayer" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
            <View hierarchyUID="TWT1510201" localEntryUID="TWT1510201" entryName="BBC iPlayer" entryType="1" sequence="0" parentHUID="TWT1510199" parentEntryType="2" productOfferingUID="TWT166" productOfferingHUID="TWT1510199" isManual="false" isInvisible="false" entryCount="0" folderCount="3" isLastDepth="true" folderType="5" linkType="1" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1510200" localEntryUID="TWT1510200" entryName="BBC iPlayer Space" entryType="1" sequence="1" parentHUID="TWT1510199" parentEntryType="2" productOfferingUID="TWT166" productOfferingHUID="TWT1510199" isManual="false" isInvisible="false" entryCount="0" folderCount="3" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT170" productOfferingType="2" productOfferingName="Internal Communications" activeViewHUID="TWT1577458" status="2" rating="U" hierarchyUID="TWT1577456" parentHUID="H0" parentEntryType="1" productOfferingSequence="96" localEntryUID="TWT170" entryName="Internal Communications" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="1" packageID="NotRequired" suspendlistLivetime="0">
            <Description>Not for customers</Description>
            <View hierarchyUID="TWT1577458" localEntryUID="TWT1577458" entryName="Internal Communications" entryType="1" sequence="0" parentHUID="TWT1577456" parentEntryType="2" productOfferingUID="TWT170" productOfferingHUID="TWT1577456" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1577457" localEntryUID="TWT1577457" entryName="Internal Comms Space" entryType="1" sequence="1" parentHUID="TWT1577456" parentEntryType="2" productOfferingUID="TWT170" productOfferingHUID="TWT1577456" isManual="false" isInvisible="false" entryCount="0" folderCount="0" isLastDepth="true" folderType="4" linkType="1" linkTargetHUID=""/>
         </SVOD>
         <Folder hierarchyUID="TWT3055" localEntryUID="TWT3055" entryName="Promotions_folder" entryType="1" sequence="98" parentHUID="H0" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="1" isLastDepth="false" folderType="1" linkType="1" linkTargetHUID="">
            <Folder hierarchyUID="TWT1988933" localEntryUID="TWT1988933" entryName="Movie Boxsets~C1~L2~P1" entryType="1" sequence="0" parentHUID="TWT3055" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="1" isLastDepth="true" folderType="1" linkType="1" linkTargetHUID=""/>
            <SpecialOffering productOfferingID="TWT33" productOfferingType="3" productOfferingName="3 For 2 Movies" activeViewHUID="TWT12896" status="2" rating="U" hierarchyUID="TWT12895" parentHUID="TWT3055" parentEntryType="1" productOfferingSequence="1" localEntryUID="TWT33" entryName="3 For 2 Movies" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="2" specialOfferType="5" campaignID="TWT104" promoter="TW">
               <Description>3 for 2 promotion description~P1</Description>
               <ListOfRule>
                  <RedemptionRule ruleID="3782" ruleType="3" ruleSubType="4" productNumber="3"/>
                  <ValidationRule ruleID="3783" ruleType="1" effectiveTime="2012-01-18 12:00:00" expirationTime="2014-01-01 13:00:00"/>
               </ListOfRule>
            </SpecialOffering>
         </Folder>
         <Folder hierarchyUID="TWT1765877" localEntryUID="TWT1765877" entryName="Adult Promotions_folder" entryType="1" sequence="99" parentHUID="H0" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="1" isLastDepth="false" folderType="1" linkType="1" linkTargetHUID="">
            <Folder hierarchyUID="TWT1765878" localEntryUID="TWT1765878" entryName="Adult Bundles" entryType="1" sequence="0" parentHUID="TWT1765877" parentEntryType="1" isManual="false" isInvisible="false" entryCount="0" folderCount="3" isLastDepth="true" folderType="1" linkType="1" linkTargetHUID=""/>
         </Folder>
         <RVOD productOfferingID="TWT176" productOfferingType="1" productOfferingName="Live Events" activeViewHUID="TWT1796096" status="2" rating="U" hierarchyUID="TWT1796092" parentHUID="H0" parentEntryType="1" productOfferingSequence="100" localEntryUID="TWT176" entryName="Live Events" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4">
            <Description>~C11~D12</Description>
            <View hierarchyUID="TWT1796096" localEntryUID="TWT1796096" entryName="Current and Bookable Events~C11~D12" entryType="1" sequence="0" parentHUID="TWT1796092" parentEntryType="2" productOfferingUID="TWT176" productOfferingHUID="TWT1796092" isManual="false" isInvisible="false" entryCount="1" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1796093" localEntryUID="TWT1796093" entryName="Live Events Space" entryType="1" sequence="1" parentHUID="TWT1796092" parentEntryType="2" productOfferingUID="TWT176" productOfferingHUID="TWT1796092" isManual="false" isInvisible="false" entryCount="1" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </RVOD>
         <RVOD productOfferingID="TWT177" productOfferingType="1" productOfferingName="Adult Pay Per Night" activeViewHUID="TWT1796097" status="2" rating="U" hierarchyUID="TWT1796094" parentHUID="H0" parentEntryType="1" productOfferingSequence="101" localEntryUID="TWT177" entryName="Adult Pay Per Night" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="1">
            <Description>~C11~S10~P3~D10</Description>
            <View hierarchyUID="TWT1796097" localEntryUID="TWT1796097" entryName="Adult Pay Per Night~C11~S10~P3~D10" entryType="1" sequence="0" parentHUID="TWT1796094" parentEntryType="2" productOfferingUID="TWT177" productOfferingHUID="TWT1796094" isManual="false" isInvisible="false" entryCount="8" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT1796095" localEntryUID="TWT1796095" entryName="Adult Pay Per Night Space" entryType="1" sequence="1" parentHUID="TWT1796094" parentEntryType="2" productOfferingUID="TWT177" productOfferingHUID="TWT1796094" isManual="false" isInvisible="false" entryCount="8" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </RVOD>
         <SVOD productOfferingID="TWT9" productOfferingType="2" productOfferingName="UK2 Help Videos" activeViewHUID="TWT188106" status="2" rating="U" hierarchyUID="TWT188098" parentHUID="H0" parentEntryType="1" productOfferingSequence="110" localEntryUID="TWT9" entryName="UK2 Help Videos" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="4" packageID="NotRequired" suspendlistLivetime="0">
            <Description>Help videos for UK2 only~W0~R0</Description>
            <View hierarchyUID="TWT188106" localEntryUID="TWT188106" entryName="UK2 Help Video View~W0~R0" entryType="1" sequence="0" parentHUID="TWT188098" parentEntryType="2" productOfferingUID="TWT9" productOfferingHUID="TWT188098" isManual="false" isInvisible="false" entryCount="7" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT188099" localEntryUID="TWT188099" entryName="UK2 Help Videos Space" entryType="1" sequence="1" parentHUID="TWT188098" parentEntryType="2" productOfferingUID="TWT9" productOfferingHUID="TWT188098" isManual="false" isInvisible="false" entryCount="7" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
         <SVOD productOfferingID="TWT10" productOfferingType="2" productOfferingName="UK2 How To Use" activeViewHUID="TWT198735" status="2" rating="U" hierarchyUID="TWT198721" parentHUID="H0" parentEntryType="1" productOfferingSequence="112" localEntryUID="TWT10" entryName="UK2 How To Use" entryType="2" isManual="false" isInvisible="false" entryCount="0" folderCount="0" assetType="1" packageID="NotRequired" suspendlistLivetime="0">
            <Description>~W0~R0</Description>
            <View hierarchyUID="TWT198735" localEntryUID="TWT198735" entryName="UK2 How To Use~W0~R0" entryType="1" sequence="0" parentHUID="TWT198721" parentEntryType="2" productOfferingUID="TWT10" productOfferingHUID="TWT198721" isManual="false" isInvisible="false" entryCount="7" folderCount="0" isLastDepth="true" folderType="5" linkType="2" linkTargetHUID=""/>
            <Space hierarchyUID="TWT198722" localEntryUID="TWT198722" entryName="UK2 How To Use Space" entryType="1" sequence="1" parentHUID="TWT198721" parentEntryType="2" productOfferingUID="TWT10" productOfferingHUID="TWT198721" isManual="false" isInvisible="false" entryCount="7" folderCount="0" isLastDepth="true" folderType="4" linkType="2" linkTargetHUID=""/>
         </SVOD>
      </ListOfEntry>
      <EntrySearchCondition>
         <PageNo>-1</PageNo>
         <HierarchyUID>H0</HierarchyUID>
         <Depth>2</Depth>
         <ListProduct>true</ListProduct>
         <ListLink></ListLink>
         <NeedAssociatedAsset>false</NeedAssociatedAsset>
         <DisplayMode>0</DisplayMode>
         <NeedCache></NeedCache>
         <SearchEntryType>-1</SearchEntryType>
         <SearchAssetState>1</SearchAssetState>
         <SearchPOState>1</SearchPOState>
         <ShowProduct>3</ShowProduct>
      </EntrySearchCondition>
   </DataArea>
</EntryListAction> 



RE: A simple lesson in Arrays?

Quote (madasafish)


Is it really that complicated?. It would be simpler to parse the file again to pick up the suid.
And what seems to be complicated for you? Post an example how would you parse the file again to pick up suid.

I don't see the relation between the data you posted first and the XML document you posted last.
To parse the XML I would use Vbscript, Perl, Python or other language which has XML parser available.

RE: A simple lesson in Arrays?

(OP)

Quote (mikrom)

I don't see the relation between the data you posted first and the XML document you posted last.
I was trying to simplify it with the emphasis on what is the method of getting a 4th parameter (in my case) that could lie anywhere else in the file. It is true, there is no mention of fred bert harry in the real data I am using.

Quote (mikrom)

To parse the XML I would use Vbscript, Perl, Python or other language which has XML parser available.
Noted.

Quote (mikrom)

And what seems to be complicated for you? Post an example how would you parse the file again to pick up suid.
I can get the desired result but it means I have to iterate through the POFILE again with a "while read" or a "getline" loop which is in-efficient and not very elegant.

Quote (Madasafish)

Not that I am un-appreciative of Mikom's answer, thank-you Mikom.
I thank-you again, I really do appreciate the effort and time you spent to answer my question and apologies if my effort to simplify this has caused consternation.

Quote (mikrom)

And what seems to be complicated for you? Post an example how would you parse the file again to pick up suid.

Simple version with real data taken from the XML file supplied.

CODE -->

Data
TWT2151862 TWT261
TWT219 Sneak_Peeks TWT1915847
TWT2236936 TWT287
TWT1796093 TWT176
TWT263 Teleport_TV_XL TWT12872
TWT12873 TWT263
TWT262 Teleport_TV_L TWT2201455
TWT306 Teleport_TV_M+ TWT2267561
TWT2267562 TWT306
TWT2275878 TWT325
TWT303 Sky_Movies_HD TWT2256641
TWT304 Sky_Sports_HD TWT2258986
TWT319 Teleport_TV_Free TWT2271962
TWT2271963 TWT319
TWT20 Teleport_Movies TWT331
TWT332 TWT20
TWT13 3D_for_XL TWT2013724
TWT2013725 TWT13
TWT287 Sky_Movies TWT2236935
TWT2256642 TWT303
TWT203 PictureBox TWT1844078
TWT1844079 TWT203
TWT305 Sports TWT2267535
TWT2267536 TWT305
TWT302 Sky_Sports TWT2255731
TWT2201456 TWT262
TWT2255732 TWT302
TWT2258987 TWT304
TWT307 ESPN TWT2270270
TWT325 Teleport_TV_M+_Plus TWT2275877
TWT1915848 TWT219
TWT2270271 TWT307
TWT173 More_Free TWT1763119
TWT1763120 TWT173
TWT161 Virgin_Central TWT1454833
TWT1454834 TWT161
TWT176 Live_Events TWT1796092
TWT261 TiVo_Replay TWT2151861 

Desired result - Order is not important.

CODE -->

TWT261 TiVo_Replay TWT2151861 TWT2151862
TWT219 Sneak_Peeks TWT1915847 TWT1915848
TWT263 Teleport_TV_XL TWT12872 TWT12873
TWT262 Teleport_TV_L TWT2201455 TWT2201456
TWT306 Teleport_TV_M+ TWT2267561 TWT2267562
TWT325 Teleport_TV_M+_Plus TWT2275877 TWT2275878
TWT319 Teleport_TV_Free TWT2271962 TWT2271963
TWT20 Teleport_Movies TWT331 TWT332
TWT13 3D_for_XL TWT2013724 TWT2013725
TWT287 Sky_Movies TWT2236935 TWT2236936
TWT303 Sky_Movies_HD TWT2256641 TWT2256642
TWT203 PictureBox TWT1844078 TWT1844079
TWT305 Sports TWT2267535 TWT2267536
TWT302 Sky_Sports TWT2255731 TWT2255732
TWT304 Sky_Sports_HD TWT2258986 TWT2258987
TWT307 ESPN TWT2270270 TWT2270271
TWT173 More_Free TWT1763119 TWT1763120
TWT161 Virgin_Central TWT1454833 TWT1454834
TWT176 Live_Events TWT1796092 TWT1796093 

Appending to my previous code posting this gives the desired result but is in-efficient.

CODE -->

}' $POFILE > /tmp/po_tmp


cat /tmp/po_tmp | while read POID PO_NAME HUID
                  do
                        gawk -v poid=$POID -v poname=$PO_NAME -v huid=$HUID  -F'" ' ' $0 !~ /Space hierarchyUID/ {next}
                        { gsub("\"|<","",$1); gsub("\"","",$8)
                          split ($1,a,"=");split ($8,b,"=")
                          suid=a[2]
                          pohuid=b[2]
                          if (poid == pohuid)  { print poid,poname,huid,suid
                          }
                        }' $POFILE

                  done 

RE: A simple lesson in Arrays?

If Order is not important, then we don't need the list of keys and the script could be simplified

CODE

# Run: awk -f madasafish3.awk madasafish_file3.txt
BEGIN {
  FS=" "
}

NF == 2 { 
  key = $2
  suid = $1
  suids[key] = suid
}

NF == 3 {
  key = $1 
  poname = $2
  huid = $3
  values[key] = poname "," huid
}

END {
  print "Result:"
  for (key in values) {
    value = values[key]
    if (split(value, tmp_array, ",") == 2) {
      poname = tmp_array[1]
      huid = tmp_array[2]
      suid = suids[key]
      printf "%-6s    %-20s  %-10s    %-10s\n", key, poname, huid, suid
    }
  }
} 

Output:

CODE

Result:
TWT173    More_Free             TWT1763119    TWT1763120
TWT261    TiVo_Replay           TWT2151861    TWT2151862
TWT302    Sky_Sports            TWT2255731    TWT2255732
TWT176    Live_Events           TWT1796092    TWT1796093
TWT303    Sky_Movies_HD         TWT2256641    TWT2256642
TWT262    Teleport_TV_L         TWT2201455    TWT2201456
TWT304    Sky_Sports_HD         TWT2258986    TWT2258987
TWT263    Teleport_TV_XL        TWT12872      TWT12873  
TWT305    Sports                TWT2267535    TWT2267536
TWT219    Sneak_Peeks           TWT1915847    TWT1915848
TWT306    Teleport_TV_M+        TWT2267561    TWT2267562
TWT325    Teleport_TV_M+_Plus   TWT2275877    TWT2275878
TWT307    ESPN                  TWT2270270    TWT2270271
TWT20     Teleport_Movies       TWT331        TWT332    
TWT161    Virgin_Central        TWT1454833    TWT1454834
TWT287    Sky_Movies            TWT2236935    TWT2236936
TWT319    Teleport_TV_Free      TWT2271962    TWT2271963
TWT203    PictureBox            TWT1844078    TWT1844079
TWT13     3D_for_XL             TWT2013724    TWT2013725 

RE: A simple lesson in Arrays?

(OP)
Nice one!

Just one question that is puzzling me.

Why this?...

CODE -->

if (split(value, tmp_array, ",") == 2) 

instead of...

CODE -->

split(value, tmp_array, ",") 

RE: A simple lesson in Arrays?

I coded it only to be sure if everything is ok.
As you know split() returns number of array elements. In this case if it doesn't return 2 array elements something goes wrong and the result isn't ok.

RE: A simple lesson in Arrays?

(OP)
Can I be bold and invite an academic exercise? 3eyes

How would you approach this if there were 3 fields on all data lines.

RE: A simple lesson in Arrays?

Quote (madasafish)


How would you approach this if there were 3 fields on all data lines.
It depends on the desired output.
Post the example data and the output you want.

RE: A simple lesson in Arrays?

(OP)
Same data. Where it has 2 fields the third field is totally (non-matching) random data.
How would you do it?

Madasafish

RE: A simple lesson in Arrays?

An attempt direct from the xml file:

CODE

awk -F'" ' '/productOfferingID/{
  split($1,a,"=\"");split($3,b,"=\"");split($7,c,"=")
  gsub(" ","_",b[2]);gsub("\"","",c[2])
  X[a[2]]=a[2]" "b[2]" "c[2]
}
/Space hierarchyUID/{
  gsub("\"|<","",$1);gsub("\"","",$8)
  split($1,a,"=");split ($8,b,"=")
  Y[b[2]]=a[2]
}
END{for(i in X)print X[i],Y[i]}' $POFILE 

Hope This Helps, PH.
FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?

RE: A simple lesson in Arrays?

Madasafish, just to know, did you try my last suggestions ?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close