Hi people,
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

Mit freundlichen Grüßen,
Mark Wilson
WILSONCOM.


_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to