|
|
| version 1.2, 2007/08/20 09:20:15 | version 1.4, 2010/07/25 06:23:41 |
|---|---|
| Line 4 $xdoc[^xdoc::create{<?xml version="1.0" | Line 4 $xdoc[^xdoc::create{<?xml version="1.0" |
| <!--some comment--> | <!--some comment--> |
| <people xmlns:first="http://parser.ru/first" xmlns:second="http://parser.ru/second"> | <people xmlns:first="http://parser.ru/first" xmlns:second="http://parser.ru/second"> |
| <man first:attrname="attr value"> | <man first:attrname="attr value"> |
| <name>ПИФ^taint[&]</name> | <name>ПИФ^taint[&]</name> |
| </man> | </man> |
| <man id="1" имя="word слово"> | <man id="1" имя="word слово"> |
| <name>P«^;AF B</name> | <name>P«^;AF B</name> |
| Line 57 $man1[^xdoc.selectSingle[/people/man[@id | Line 57 $man1[^xdoc.selectSingle[/people/man[@id |
| $name2[^xdoc.selectSingle[/people/man[@id=1]/name]] | $name2[^xdoc.selectSingle[/people/man[@id=1]/name]] |
| /people/man[@id=1]/name ^if(^name2.hasAttributes[]){has;hasn't} attributes<br /> | /people/man[@id=1]/name ^if(^name2.hasAttributes[]){has;hasn't} attributes<br /> |
| @dump[sTitle;xdoc] | @dump[sTitle;xdoc] |
| ^if(def $sTitle){<h2>$sTitle</h2>} | ^if(def $sTitle){<h2>$sTitle</h2>} |
| ^show_xdoc2[$xdoc]<hr /> | ^show_xdoc2[$xdoc]<hr /> |
| ^show_xnode1[$xdoc]<hr /> | ^show_xnode1[$xdoc]<hr /> |
| <hr /> | <hr /> |
| @show1[array][i;x;pattributes] | @show1[array][i;x;pattributes] |
| ^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[]){ |
| Line 78 $name2[^xdoc.selectSingle[/people/man[@i | Line 74 $name2[^xdoc.selectSingle[/people/man[@i |
| <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;pairs;names] | @show_xnode1[x;level;single][l;pairs;names] |
| ^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[ |