|
|
| version 1.2, 2005/12/19 12:24:57 | version 1.3, 2010/07/25 06:14:46 |
|---|---|
| Line 1 | Line 1 |
| @main[] | @main[] |
| $xdoc[^xdoc::create[doc]] | $xdoc[^xdoc::create[doc]] |
| $elem[^xdoc.createElementNS[http://parser.ru/first;first:elementWithNamespace1]] | $elem[^xdoc.createElementNS[http://parser.ru/first;first:elementWithNamespace1]] |
| $dummy[^xdoc.firstChild.appendChild[$elem]] | $dummy[^xdoc.firstChild.appendChild[$elem]] |
| #todo:someday render ns decls | #todo:someday render ns decls |
| ^dump[$xdoc] | ^dump[$xdoc] |
| $elem[^xdoc.createElementNS[http://parser.ru/first;first:elementWithNamespace1]] | $elem[^xdoc.createElementNS[http://parser.ru/first;first:elementWithNamespace1]] |
| $dummy[^xdoc.firstChild.appendChild[$elem]] | $dummy[^xdoc.firstChild.appendChild[$elem]] |
| ^dump[$xdoc] | ^dump[$xdoc] |
| $nodeList[^xdoc.getElementsByTagNameNS[http://parser.ru/first;elementWithNamespace1]] | $nodeList[^xdoc.getElementsByTagNameNS[http://parser.ru/first;elementWithNamespace1]] |
| ^show_xnodes1[$nodeList] | ^show_xnodes1[$nodeList] |
| <hr><hr> | <hr><hr> |
| @dump[xdoc] | |
| @dump[xdoc] | ^show_xdoc2[$xdoc]<hr> |
| ^show_xdoc2[$xdoc]<hr> | ^show_xnode1[$xdoc]<hr> |
| ^show_xnode1[$xdoc]<hr> | <hr> |
| <hr> | |
| @show1[array] | |
| @show1[array] | ^for[i](0;$array-1){ |
| ^for[i](0;$array-1){ | $x[$array.$i] |
| $x[$array.$i] | $x.firstChild.nodeValue: |
| $x.firstChild.nodeValue: | $pattributes[$x.parentNode.attributes] |
| $pattributes[$x.parentNode.attributes] | ^if(^pattributes._count[]){ |
| ^if(^pattributes._count[]){ | $pattributes.id.name=$pattributes.id.nodeValue |
| $pattributes.id.name=$pattributes.id.nodeValue | } |
| } | <br> |
| <br> | } |
| } | |
| @show_xnodes1[array][i] | |
| @show_xnodes1[array][i] | ^for[i](0;^array._count[]-1){ |
| ^for[i](0;^array._count[]-1){ | ^show_xnode1[$array.$i;0;1] |
| ^show_xnode1[$array.$i;0;1] | } |
| } | |
| @show_xnode1[x;level;single][l] | |
| @show_xnode1[x;level;single][l] | ^if(def $x){ |
| ^if(def $x){ | ^for[l](0;$level-1){ ^; ^; ^; ^;} |
| ^for[l](0;$level-1){ ^; ^; ^; ^;} | ^if($x.nodeType == $xnode:ELEMENT_NODE){ |
| ^if($x.nodeType == $xnode:ELEMENT_NODE){ | <^;$x.nodeName |
| <^;$x.nodeName | $pairs[$x.attributes] |
| $pairs[$x.attributes] | ^if(def $pairs){ |
| ^if(def $pairs){ | $names[^pairs._keys[]] |
| $names[^pairs._keys[]] | ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"} |
| ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"} | } |
| } | >^; |
| >^; | }{ |
| }{ | [$x.nodeType] |
| [$x.nodeType] | } |
| } | |
| ^if(def $x.nodeValue){$x.nodeValue}<br> | |
| ^if(def $x.nodeValue){$x.nodeValue}<br> | ^show_xnode1[$x.firstChild]($level+1) |
| ^show_xnode1[$x.firstChild]($level+1) | ^if(!$single){ |
| ^if(!$single){ | ^show_xnode1[$x.nextSibling]($level) |
| ^show_xnode1[$x.nextSibling]($level) | } |
| } | |
| ^if($x.nodeType == $xnode:ELEMENT_NODE){ | |
| ^if($x.nodeType == $xnode:ELEMENT_NODE){ | ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br> |
| ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br> | } |
| } | } |
| } | |
| @show_xdoc2[xdoc] | |
| @show_xdoc2[xdoc] | #$response:body[^xdoc.file[ $.media-type[text/paf] ]] |
| #$response:body[^xdoc.file[ $.media-type[text/paf] ]] | <pre>^taint[html][^xdoc.string[ |
| <pre>^taint[html][^xdoc.string[ | # $.method[html] |
| # $.method[html] | # $.encoding[utF-8] |
| # $.encoding[utF-8] | # $.omit-xml-declaration[yes] |
| # $.omit-xml-declaration[yes] | # $.standalone[no] |
| # $.standalone[no] | # -$.doctype-public[-//W3C//DTD XHTML] |
| # -$.doctype-public[-//W3C//DTD XHTML] | # -$.doctype-system[/a/b/c/] |
| # -$.doctype-system[/a/b/c/] | # $.indent[yes] |
| # $.indent[yes] | # $.media-type[text/paf] |
| # $.media-type[text/paf] | ]] |
| ]] | </pre> |
| </pre> |