FWIW do any of the following find anything? /message/body/data/lookupdata/items/item[abbr='PRUE'] /message/body/data/lookupdata/items/item[abbr='K']
It could be that JDOM is splitting the text 'KU' over multiple text nodes due to buffer-splitting that can occur in the underlying SAX parser. Bit of a shot in the dark though. James ----- Original Message ----- From: "bob mcwhirter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 29, 2002 5:00 PM Subject: [Jaxen] RE: [jdom-interest] Jaxen 1.0 Released (fwd) fwd'd to list (possibly twice) to see if anyone else has an idea. -bob ---------- Forwarded message ---------- To: 'bob mcwhirter' <[EMAIL PROTECTED]> From: MarkW <[EMAIL PROTECTED]> Date: Mon, 29 Apr 2002 16:00:30 +0200 Subject: RE: [jdom-interest] Jaxen 1.0 Released Hi Bob, just downloaded Jaxen 1.0 and tested to see if my app. still works ... unfortunately it doesn´t! I using the following helper method to select a node: public static Element getJDOMElement( Document doc, String xPath ) { Element ele = null; try { ele = (Element)new JDOMXPath( xPath ).selectSingleNode(doc); if ( ele == null ) { throw new SAXPathException( "Element could not be found: \nXPath: " + xPath + "\nxml: " + JDOMDocToStringBuffer( doc ).toString() ); } } catch ( SAXPathException spx ) { logError( spx ); } return ele; } Example of a typical xml I must search: <?xml version="1.0" encoding="ISO-8859-1"?> <message> <header> <lookup>grouptype</lookup> <lookupdefault>_NONE_</lookupdefault> </header> <body> <data> <lookupdata> <items> <item> <id>6</id> <abbr>PRUE</abbr> <description>Assessor</description> </item> <item> <id>2</id> <abbr>GREM</abbr> <description>Gremium</description> </item> <item> <id>1</id> <abbr>KU</abbr> <description>Kunde</description> </item> <item> <id>3</id> <abbr>LIEF</abbr> <description>Lieferant</description> </item> <item> <id>4</id> <abbr>ORG</abbr> <description>Organisation</description> </item> <item> <id>5</id> <abbr>PGEB</abbr> <description>Prüfgebiet</description> </item> <item> <id>7</id> <abbr>SK</abbr> <description>Sektorkomitee</description> </item> </items> </lookupdata> </data> </body> </message> Using the xpath-expression "/message/body/data/lookupdata/items/item[abbr='KU']" I got the required element in jaxen10b7 but in jaxen 1.0 FCS the returned element is null. Any ideas? Greetings from Germany, Mark > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of bob mcwhirter > Sent: Friday, April 26, 2002 10:18 PM > To: [EMAIL PROTECTED] > Subject: [jdom-interest] Jaxen 1.0 Released > > > > Howdy folks-- > > Jaxen 1.0 (and SAXPath 1.0) has been released today. > http://jaxen.org/ You can now use an official, blessed, non-beta release of Jaxen in your favorite project. No longer do you have to sell management on the idea of 'beta' software. fwiw, Jaxen is also working its way into the JSP Standard Taglib from Sun. Additionally, independent benchmarks have shown that Jaxen is typically much faster than the Xalan XPath engine. -bob _______________________________________________ To control your jdom-interest membership: http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@you rhost.com _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest