C:\unregistered\v1.3\samples\benchmark>echo JAXEN DOM benchmark JAXEN DOM benchmark C:\unregistered\v1.3\samples\benchmark>java -classpath jaxen/classes;../dom/lib/xml-apis.jar;../dom/lib/xercesImpl.jar;lib/jaxen-core.jar;lib/jaxen-dom.jar;lib/saxpath.jar demo.Demo ../data/simple1.xml ../data/test2.lst bench a/d[2]/e ------------------------------------- ------------------------------------- local-name( /root/a ) ------------------------------------- ------------------------------------- *[c or d] ------------------------------------- ------------------------------------- a/c[d] ------------------------------------- ------------------------------------- a/c[d="Text for D"] ------------------------------------- ------------------------------------- a[3][@a1="va1"] ------------------------------------- ------------------------------------- a[@a1="va1"][1] ------------------------------------- ------------------------------------- a[@a1="va1"] ------------------------------------- ------------------------------------- /root/a/c/../@a1 ------------------------------------- ------------------------------------- /root/a/.. ------------------------------------- ------------------------------------- .//c ------------------------------------- ------------------------------------- . ------------------------------------- ------------------------------------- //c/d ------------------------------------- ------------------------------------- //c ------------------------------------- ------------------------------------- a/d[2]/e ------------------------------------- ------------------------------------- */d ------------------------------------- ------------------------------------- a[last()] ------------------------------------- ------------------------------------- a[1] ------------------------------------- ------------------------------------- /root/a[1]/@* ------------------------------------- ------------------------------------- /root/a[1]/@a1 ------------------------------------- ------------------------------------- text() ------------------------------------- ------------------------------------- * ------------------------------------- ------------------------------------- a ------------------------------------- ------------------------------------- /root/a[(1+1-1)*2 div 2] ------------------------------------- ------------------------------------- /root ------------------------------------- ------------------------------------- child::*[self::a or self::b][position()=last() - 1] ------------------------------------- ------------------------------------- child::*[self::a or self::b] ------------------------------------- ------------------------------------- child::a/child::c[child::d='Text for D'] ------------------------------------- ------------------------------------- child::a/child::c[child::d] ------------------------------------- ------------------------------------- child::a[position()=1][attribute::a1="va1"] ------------------------------------- ------------------------------------- child::a[attribute::a1="va1"][position()=1] ------------------------------------- ------------------------------------- child::a[attribute::a2="va2"] ------------------------------------- ------------------------------------- child::a/child::d[position()=2]/child::e[position()=1] ------------------------------------- ------------------------------------- /descendant::a[position()=2] ------------------------------------- ------------------------------------- child::a[1]/child::d[1]/preceding-sibling::c[position()=1] ------------------------------------- ------------------------------------- child::a[2]/following-sibling::b[position()=1] ------------------------------------- ------------------------------------- child::a[position()=2] ------------------------------------- ------------------------------------- child::a[position()=last()-1] ------------------------------------- ------------------------------------- child::a[position()=last()] ------------------------------------- ------------------------------------- child::a[position()=1] ------------------------------------- ------------------------------------- /descendant::a/child::c ------------------------------------- ------------------------------------- / ------------------------------------- ------------------------------------- /descendant::a ------------------------------------- ------------------------------------- /child::root/child::*/child::d ------------------------------------- ------------------------------------- child::b/descendant::a ------------------------------------- ------------------------------------- self::root ------------------------------------- ------------------------------------- /child::root/child::a/descendant-or-self::a ------------------------------------- ------------------------------------- /child::root/child::a/ancestor-or-self::a ------------------------------------- ------------------------------------- /child::root/child::a/child::c/ancestor::root ------------------------------------- ------------------------------------- /child::root/descendant::a ------------------------------------- ------------------------------------- /child::root/child::a/attribute::* ------------------------------------- ------------------------------------- /child::root/child::a/attribute::a1 ------------------------------------- ------------------------------------- /child::root/child::node() ------------------------------------- ------------------------------------- /child::root/child::a/child::d/child::text() ------------------------------------- ------------------------------------- /child::root/child::* ------------------------------------- ------------------------------------- /child::root/child::a ------------------------------------- ------------------------------------- /descendant::test:* ------------------------------------- ------------------------------------- /descendant::test:* ------------------------------------- ------------------------------------- /descendant::test:e ------------------------------------- ------------------------------------- /descendant::test:f ------------------------------------- ------------------------------------- /root/test:*/text() ------------------------------------- ------------------------------------- //root ------------------------------------- ------------------------------------- //c[@c1='vc1'] ------------------------------------- ------------------------------------- //c[starts-with(@c1, 'vc')] ------------------------------------- ------------------------------------- //c[contains(@c1, 'vc')] ------------------------------------- ------------------------------------- //c[string-length(@c1)=3] ------------------------------------- ------------------------------------- 'hello' ------------------------------------- ------------------------------------- concat( 'hello', 'world' ) ------------------------------------- ------------------------------------- boolean( /root ) ------------------------------------- ------------------------------------- local-name( /root/a ) ------------------------------------- ------------------------------------- concat( "add ", local-name( /root/a ) ) ------------------------------------- ------------------------------------- Total = 410 END JAXEN/DOM TEST IN MS C:\unregistered\v1.3\samples\benchmark>pause Appuyez sur une touche pour continuer... C:\unregistered\v1.3\samples\benchmark>echo 'JXP DOM benchmark' 'JXP DOM benchmark' C:\unregistered\v1.3\samples\benchmark>pushd ..\dom C:\unregistered\v1.3\samples\dom>java -classpath classes;../../lib/jxp.jar;lib/xercesImpl.jar;../../classes;lib/xml-apis.jar demo.Demo ../data/simple1.xml ../data/test2.lst bench) a/d[2]/e ------------------------------------- ------------------------------------- local-name( /root/a ) ------------------------------------- ------------------------------------- *[c or d] ------------------------------------- ------------------------------------- a/c[d] ------------------------------------- ------------------------------------- a/c[d="Text for D"] ------------------------------------- ------------------------------------- a[3][@a1="va1"] ------------------------------------- ------------------------------------- a[@a1="va1"][1] ------------------------------------- ------------------------------------- a[@a1="va1"] ------------------------------------- ------------------------------------- /root/a/c/../@a1 ------------------------------------- ------------------------------------- /root/a/.. ------------------------------------- ------------------------------------- .//c ------------------------------------- ------------------------------------- . ------------------------------------- ------------------------------------- //c/d ------------------------------------- ------------------------------------- //c ------------------------------------- ------------------------------------- a/d[2]/e ------------------------------------- ------------------------------------- */d ------------------------------------- ------------------------------------- a[last()] ------------------------------------- ------------------------------------- a[1] ------------------------------------- ------------------------------------- /root/a[1]/@* ------------------------------------- ------------------------------------- /root/a[1]/@a1 ------------------------------------- ------------------------------------- text() ------------------------------------- ------------------------------------- * ------------------------------------- ------------------------------------- a ------------------------------------- ------------------------------------- /root/a[(1+1-1)*2 div 2] ------------------------------------- ------------------------------------- /root ------------------------------------- ------------------------------------- child::*[self::a or self::b][position()=last() - 1] ------------------------------------- ------------------------------------- child::*[self::a or self::b] ------------------------------------- ------------------------------------- child::a/child::c[child::d='Text for D'] ------------------------------------- ------------------------------------- child::a/child::c[child::d] ------------------------------------- ------------------------------------- child::a[position()=1][attribute::a1="va1"] ------------------------------------- ------------------------------------- child::a[attribute::a1="va1"][position()=1] ------------------------------------- ------------------------------------- child::a[attribute::a2="va2"] ------------------------------------- ------------------------------------- child::a/child::d[position()=2]/child::e[position()=1] ------------------------------------- ------------------------------------- /descendant::a[position()=2] ------------------------------------- ------------------------------------- child::a[1]/child::d[1]/preceding-sibling::c[position()=1] ------------------------------------- ------------------------------------- child::a[2]/following-sibling::b[position()=1] ------------------------------------- ------------------------------------- child::a[position()=2] ------------------------------------- ------------------------------------- child::a[position()=last()-1] ------------------------------------- ------------------------------------- child::a[position()=last()] ------------------------------------- ------------------------------------- child::a[position()=1] ------------------------------------- ------------------------------------- /descendant::a/child::c ------------------------------------- ------------------------------------- / ------------------------------------- ------------------------------------- /descendant::a ------------------------------------- ------------------------------------- /child::root/child::*/child::d ------------------------------------- ------------------------------------- child::b/descendant::a ------------------------------------- ------------------------------------- self::root ------------------------------------- ------------------------------------- /child::root/child::a/descendant-or-self::a ------------------------------------- ------------------------------------- /child::root/child::a/ancestor-or-self::a ------------------------------------- ------------------------------------- /child::root/child::a/child::c/ancestor::root ------------------------------------- ------------------------------------- /child::root/descendant::a ------------------------------------- ------------------------------------- /child::root/child::a/attribute::* ------------------------------------- ------------------------------------- /child::root/child::a/attribute::a1 ------------------------------------- ------------------------------------- /child::root/child::node() ------------------------------------- ------------------------------------- /child::root/child::a/child::d/child::text() ------------------------------------- ------------------------------------- /child::root/child::* ------------------------------------- ------------------------------------- /child::root/child::a ------------------------------------- ------------------------------------- /descendant::test:* ------------------------------------- ------------------------------------- /descendant::test:* ------------------------------------- ------------------------------------- /descendant::test:e ------------------------------------- ------------------------------------- /descendant::test:f ------------------------------------- ------------------------------------- /root/test:*/text() ------------------------------------- ------------------------------------- //root ------------------------------------- ------------------------------------- //c[@c1='vc1'] ------------------------------------- ------------------------------------- //c[starts-with(@c1, 'vc')] ------------------------------------- ------------------------------------- //c[contains(@c1, 'vc')] ------------------------------------- ------------------------------------- //c[string-length(@c1)=3] ------------------------------------- ------------------------------------- 'hello' ------------------------------------- ------------------------------------- concat( 'hello', 'world' ) ------------------------------------- ------------------------------------- boolean( /root ) ------------------------------------- ------------------------------------- local-name( /root/a ) ------------------------------------- ------------------------------------- concat( "add ", local-name( /root/a ) ) ------------------------------------- ------------------------------------- Total = 330 C:\unregistered\v1.3\samples\dom>popd END JXP/DOM TEST IN MS C:\unregistered\v1.3\samples\benchmark>pause Appuyez sur une touche pour continuer...