I got caught with this too.. Check the list archives. But I think in your XML document you have something like
<tag xmlns="<URI for default>" > ....<default> </default> </tag> And in Jaxen you use an explicit namespace but with the same URI as in the XML document.. The Matching is done by URI not by the ns prefix so... eg . SimpleNamespaceContext nsContext = new SimpleNamespaceContext(); nsContext.addNamespace( "def" ,"<URI for default>" ); xp.setNamespaceContext(nsContext); Then "//def:default should select the first default element above. Also (as a complete aside!) watch out for setting default namespace URIs in Stylesheets and using output type="html" in Xalan, because it may stop the output being browser friendly. HTH ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest