# jimsh
Welcome to Jim version 0.79
. source /mod/webif/lib/xml.class
xml test
. set xx [open "/mod/tmp/en.xml" r]
::aio.handle4
. set xxx [xml init [$xx read]]
<reference.<xml____>.00000000000000000000>
. for {set tag ""; set season ""} {1} {$xxx next} {
> lassign [$xxx next 1] typ val attr etyp
> if {$typ eq "EOF"} { break }
> if {$etyp eq "START"} {
> set tag $val
> if {$tag ni {id Combined_season DVD_season}} { set tag "" }
> } elseif {$typ eq "TXT" && $tag ne ""} {
> if {$tag eq "id"} {
> set season ""
> set id $val
> } elseif {$tag in {Combined_season DVD_season} && $val ne $season} {
> if {$season eq ""} {
> set season $val
> } else {
> puts "$id: $season, $tag = $val"
> }
> }
> }
>}
306167: 2, DVD_season = 1
306168: 2, DVD_season = 1
306169: 2, DVD_season = 1
306170: 2, DVD_season = 1
306171: 2, DVD_season = 1
306172: 2, DVD_season = 1
307007: 3, DVD_season = 2
307089: 3, DVD_season = 2
307090: 3, DVD_season = 2
307091: 3, DVD_season = 2
309548: 3, DVD_season = 2
313216: 4, DVD_season = 3
313217: 4, DVD_season = 3
313673: 3, DVD_season = 2
314392: 3, DVD_season = 2
317063: 3, DVD_season = 2
317064: 3, DVD_season = 2
335792: 4, DVD_season = 3
335793: 4, DVD_season = 3
335794: 4, DVD_season = 3
335795: 4, DVD_season = 3
335796: 4, DVD_season = 3
335798: 4, DVD_season = 3
378653: 5, DVD_season = 4
378656: 5, DVD_season = 4
378659: 5, DVD_season = 4
378663: 5, DVD_season = 4
378665: 5, DVD_season = 4
378667: 5, DVD_season = 4
5015817: 12, DVD_season = 11
5015818: 12, DVD_season = 11
5015819: 12, DVD_season = 11
5015821: 12, DVD_season = 11
5015822: 12, DVD_season = 11
5015823: 12, DVD_season = 11
5123244: 12, DVD_season = 11
5123246: 12, DVD_season = 11
5123247: 12, DVD_season = 11
5123248: 12, DVD_season = 11
5166473: 12, DVD_season = 11
5166474: 12, DVD_season = 11
5225253: 12, DVD_season = 11
5225254: 12, DVD_season = 11
5225255: 12, DVD_season = 11
5441126: 13, DVD_season = 12
5493712: 13, DVD_season = 12
5493713: 13, DVD_season = 12
5493714: 13, DVD_season = 12
5493715: 13, DVD_season = 12
5493716: 13, DVD_season = 12
5493717: 13, DVD_season = 12
5493718: 13, DVD_season = 12
5493719: 13, DVD_season = 12
5493720: 13, DVD_season = 12
5521430: 13, DVD_season = 12
5521431: 13, DVD_season = 12
5521433: 13, DVD_season = 12
5546736: 13, DVD_season = 12
5546737: 13, DVD_season = 12
5546738: 13, DVD_season = 12
5546739: 13, DVD_season = 12
5546740: 13, DVD_season = 12
5560899: 13, DVD_season = 12
5560900: 13, DVD_season = 12
5560901: 13, DVD_season = 12
5560902: 13, DVD_season = 12
5670286: 14, DVD_season = 13
5773608: 14, DVD_season = 13
5773609: 14, DVD_season = 13
5775508: 14, DVD_season = 13
5802133: 14, DVD_season = 13
5802134: 14, DVD_season = 13
5802135: 14, DVD_season = 13
5925435: 14, DVD_season = 13
5970948: 14, DVD_season = 13
5970949: 14, DVD_season = 13
5970951: 14, DVD_season = 13
6006925: 14, DVD_season = 13
6006926: 14, DVD_season = 13
6084382: 14, DVD_season = 13
6106624: 14, DVD_season = 13
6106625: 14, DVD_season = 13
6146544: 14, DVD_season = 13
6146545: 14, DVD_season = 13
6203747: 14, DVD_season = 13
6203748: 14, DVD_season = 13
6246774: 14, DVD_season = 13
6246775: 14, DVD_season = 13
6463065: 15, DVD_season = 0
6467665: 15, DVD_season = 0
6467666: 15, DVD_season = 0
6467667: 15, DVD_season = 0
6543804: 15, DVD_season = 0
6543805: 15, DVD_season = 0
6543806: 15, DVD_season = 0
6543807: 15, DVD_season = 0
6565184: 15, DVD_season = 0
6565186: 15, DVD_season = 0
6565190: 15, DVD_season = 0
6579622: 15, DVD_season = 0
6593325: 15, DVD_season = 0
...
7186585: 17, DVD_season = 16
7186587: 17, DVD_season = 16
...
.