echo 'JAXEN DOM benchmark' JAXEN DOM 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 = 592 echo 'JXP DOM benchmark' JXP DOM benchmark (cd ../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 = 452 echo 'JXP FP benchmark' JXP FP benchmark (cd ../fp;java -classpath classes:../../lib/jxp.jar:lib/fp.jar demo.Demo ../data/simple1.xml ../data/test2.lst bench) FastParser 1.6.2 evaluation version (c) 2002-2003 Alexandre Brillant http://www.japisoft.com a/d[2]/e ------------------------------------- 1 node found : e ------------------------------------- local-name( /root/a ) ------------------------------------- Non NodeSet : a ------------------------------------- *[c or d] ------------------------------------- 2 node found : a f ------------------------------------- a/c[d] ------------------------------------- 1 node found : c ------------------------------------- a/c[d="Text for D"] ------------------------------------- 0 node found : ------------------------------------- a[3][@a1="va1"] ------------------------------------- 0 node found : ------------------------------------- a[@a1="va1"][1] ------------------------------------- 1 node found : a ------------------------------------- a[@a1="va1"] ------------------------------------- 1 node found : a ------------------------------------- /root/a/c/../@a1 ------------------------------------- 1 node found : a1 ------------------------------------- /root/a/.. ------------------------------------- 1 node found : root ------------------------------------- .//c ------------------------------------- 2 node found : c c ------------------------------------- . ------------------------------------- 1 node found : root ------------------------------------- //c/d ------------------------------------- 1 node found : d ------------------------------------- //c ------------------------------------- 2 node found : c c ------------------------------------- a/d[2]/e ------------------------------------- 1 node found : e ------------------------------------- */d ------------------------------------- 3 node found : d d d ------------------------------------- a[last()] ------------------------------------- 1 node found : a ------------------------------------- a[1] ------------------------------------- 1 node found : a ------------------------------------- /root/a[1]/@* ------------------------------------- 4 node found : a1 a2 id xml:lang ------------------------------------- /root/a[1]/@a1 ------------------------------------- 1 node found : a1 ------------------------------------- text() ------------------------------------- 0 node found : ------------------------------------- * ------------------------------------- 7 node found : a a b e f g g ------------------------------------- a ------------------------------------- 2 node found : a a ------------------------------------- /root/a[(1+1-1)*2 div 2] ------------------------------------- 1 node found : a ------------------------------------- /root ------------------------------------- 1 node found : root ------------------------------------- child::*[self::a or self::b][position()=last() - 1] ------------------------------------- 1 node found : a ------------------------------------- child::*[self::a or self::b] ------------------------------------- 3 node found : a a b ------------------------------------- child::a/child::c[child::d='Text for D'] ------------------------------------- 0 node found : ------------------------------------- child::a/child::c[child::d] ------------------------------------- 1 node found : c ------------------------------------- child::a[position()=1][attribute::a1="va1"] ------------------------------------- 1 node found : a ------------------------------------- child::a[attribute::a1="va1"][position()=1] ------------------------------------- 1 node found : a ------------------------------------- child::a[attribute::a2="va2"] ------------------------------------- 1 node found : a ------------------------------------- child::a/child::d[position()=2]/child::e[position()=1] ------------------------------------- 1 node found : e ------------------------------------- /descendant::a[position()=2] ------------------------------------- 1 node found : a ------------------------------------- child::a[1]/child::d[1]/preceding-sibling::c[position()=1] ------------------------------------- 1 node found : c ------------------------------------- child::a[2]/following-sibling::b[position()=1] ------------------------------------- 1 node found : b ------------------------------------- child::a[position()=2] ------------------------------------- 1 node found : a ------------------------------------- child::a[position()=last()-1] ------------------------------------- 1 node found : a ------------------------------------- child::a[position()=last()] ------------------------------------- 1 node found : a ------------------------------------- child::a[position()=1] ------------------------------------- 1 node found : a ------------------------------------- /descendant::a/child::c ------------------------------------- 1 node found : c ------------------------------------- / ------------------------------------- 1 node found : / ------------------------------------- /descendant::a ------------------------------------- 3 node found : a a a ------------------------------------- /child::root/child::*/child::d ------------------------------------- 3 node found : d d d ------------------------------------- child::b/descendant::a ------------------------------------- 1 node found : a ------------------------------------- self::root ------------------------------------- 1 node found : root ------------------------------------- /child::root/child::a/descendant-or-self::a ------------------------------------- 2 node found : a a ------------------------------------- /child::root/child::a/ancestor-or-self::a ------------------------------------- 2 node found : a a ------------------------------------- /child::root/child::a/child::c/ancestor::root ------------------------------------- 1 node found : root ------------------------------------- /child::root/descendant::a ------------------------------------- 3 node found : a a a ------------------------------------- /child::root/child::a/attribute::* ------------------------------------- 6 node found : a1 a2 id xml:lang a11 id ------------------------------------- /child::root/child::a/attribute::a1 ------------------------------------- 1 node found : a1 ------------------------------------- /child::root/child::node() ------------------------------------- 7 node found : a a b e f g g ------------------------------------- /child::root/child::a/child::d/child::text() ------------------------------------- 1 node found : Text 2 for D ------------------------------------- /child::root/child::* ------------------------------------- 7 node found : a a b e f g g ------------------------------------- /child::root/child::a ------------------------------------- 2 node found : a a ------------------------------------- /descendant::test:* ------------------------------------- 2 node found : e f ------------------------------------- /descendant::test:* ------------------------------------- 2 node found : e f ------------------------------------- /descendant::test:e ------------------------------------- 1 node found : e ------------------------------------- /descendant::test:f ------------------------------------- 1 node found : f ------------------------------------- /root/test:*/text() ------------------------------------- 2 node found : Text for E Text for F ------------------------------------- //root ------------------------------------- 1 node found : root ------------------------------------- //c[@c1='vc1'] ------------------------------------- 1 node found : c ------------------------------------- //c[starts-with(@c1, 'vc')] ------------------------------------- 1 node found : c ------------------------------------- //c[contains(@c1, 'vc')] ------------------------------------- 1 node found : c ------------------------------------- //c[string-length(@c1)=3] ------------------------------------- 1 node found : c ------------------------------------- 'hello' ------------------------------------- Non NodeSet : hello ------------------------------------- concat( 'hello', 'world' ) ------------------------------------- Non NodeSet : helloworld ------------------------------------- boolean( /root ) ------------------------------------- Non NodeSet : true ------------------------------------- local-name( /root/a ) ------------------------------------- Non NodeSet : a ------------------------------------- concat( "add ", local-name( /root/a ) ) ------------------------------------- Non NodeSet : add a ------------------------------------- Total = 424