Annotation of parser3/src/www/htdocs/index.html, revision 1.334
1.312 parser 1: @main[]
1.334 ! parser 2: #^exec[]
1.333 parser 3: #^fori[]
1.329 parser 4: #^connect[mysql://hren]{^void:sql{nothing}}
5: #$response:content-type[$.value[text/html] $.charset[utf-8]]
1.333 parser 6: ^xslt[]
1.314 parser 7: OK
1.332 parser 8:
1.334 ! parser 9: @exec[]
! 10: $a[^file::exec[fc.exe;a;b]]
! 11: $a.status|$a.stderr<hr>
! 12:
1.332 parser 13: @fori[][i]
14: ^for[i](1;3){... =$i= ...}
1.307 parser 15:
1.312 parser 16: @xslt[]
1.331 parser 17: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
1.312 parser 18:
19: <people>
1.333 parser 20: <man id="1">
1.312 parser 21: <name>PAF</name>
22: </man>
23: <man id="2">
24: <name>دبش</name>
25: </man>
26: </people>
27: }]
28:
1.331 parser 29: ^show-xdoc2[$xdoc]<hr>
30: #^show-xnode1[$xdoc]<hr>
31: $people[^xdoc.select[*/man]]
1.319 parser 32: #^show1[]
1.331 parser 33: ^show-xnodes1[$people]<hr>
1.316 parser 34: #^people.0.owner.hren[]
1.312 parser 35:
1.331 parser 36: ^show-xnode1[^xdoc.select-single[*/man[2]/name];0;1]<hr>
1.318 parser 37:
1.334 ! parser 38: by id:
! 39: ^show-xnode1[^xdoc.getElementById[2];0;1]
! 40: <hr>
! 41: by tag:
! 42: $elementByTag[^xdoc.getElementsByTagName[name]]
! 43: ^show1[$elementByTag]
! 44: <hr>
! 45:
! 46: @show1[array]
! 47: ^for[i](0;^array._count[]-1){
! 48: $x[$array.$i]
1.333 parser 49: $x.firstChild.nodeValue:
50: $pattributes[$x.parentNode.attributes]
1.314 parser 51: ^if(^pattributes._count[]){
1.333 parser 52: $pattributes.id.name=$pattributes.id.nodeValue
1.314 parser 53: }
54: <br>
1.312 parser 55: }
1.318 parser 56:
1.331 parser 57: @show-xnodes1[array][i]
1.315 parser 58: ^for[i](0;^array._count[]-1){
1.331 parser 59: ^show-xnode1[$array.$i;0;1]
1.314 parser 60: }
61:
1.333 parser 62: @show-xnode1[x;level;single][l]
63: ^if(def $x){
1.318 parser 64: ^for[l](0;$level-1){ ^; ^; ^; ^;}
1.333 parser 65: ^if($x.nodeType == $xnode:ELEMENT_NODE){
66: <^;$x.nodeName
67: $pairs[$x.attributes]
1.318 parser 68: ^if(def $pairs){
69: $names[^pairs._keys[]]
1.333 parser 70: ^names.menu{$names.key=$pairs.[$names.key].nodeValue }
1.318 parser 71: }
72: >^;
73: }{
1.333 parser 74: [$x.nodeType]
1.318 parser 75: }
76:
1.333 parser 77: ^if(def $x.nodeValue){$x.nodeValue}<br>
78: ^show-xnode1[$x.firstChild]($level+1)
1.318 parser 79: ^if(!$single){
1.333 parser 80: ^show-xnode1[$x.nextSibling]($level)
1.318 parser 81: }
82:
1.333 parser 83: ^if($x.nodeType == $xnode:ELEMENT_NODE){
84: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
1.318 parser 85: }
1.315 parser 86: }
1.320 parser 87:
1.331 parser 88: @show-xdoc2[xdoc]
89: ^xdoc.save[save.xml;
1.326 parser 90: # $.encoding[windows-1251]
1.321 parser 91: $.method[xml]
92: ]
1.331 parser 93: $file[^xdoc.file[
1.326 parser 94: # $.encoding[windows-1251]
1.321 parser 95: $.method[html]
96: ]]
1.322 parser 97: ^file.save[text;save_file.html]
1.331 parser 98: ^taint[^xdoc.string[]]
1.326 parser 99: # $.encoding[windows-1251]
1.328 parser 100: # $.method[xml]
1.330 parser 101: #]]
E-mail: