Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@www.apache.org Received: (qmail 87778 invoked from network); 2 Sep 2003 15:49:31 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Sep 2003 15:49:31 -0000 Received: (qmail 67867 invoked by uid 500); 2 Sep 2003 15:49:11 -0000 Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 67828 invoked by uid 500); 2 Sep 2003 15:49:11 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 67806 invoked from network); 2 Sep 2003 15:49:11 -0000 Received: from unknown (HELO www.princetongames.org) (66.250.40.202) by daedalus.apache.org with SMTP; 2 Sep 2003 15:49:11 -0000 Received: from localhost (ammulder@localhost) by www.princetongames.org (8.11.6/8.11.6) with ESMTP id h82E8qW06929 for ; Tue, 2 Sep 2003 10:08:52 -0400 X-Authentication-Warning: www.princetongames.org: ammulder owned process doing -bs Date: Tue, 2 Sep 2003 10:08:52 -0400 (EDT) From: Aaron Mulder X-X-Sender: ammulder@www.princetongames.org To: geronimo-dev@incubator.apache.org Subject: RE: [XML Parsing] In-Reply-To: <013123D0548F804EBEF5BEE83516EB6E2C0811@apollo.3YD.COM> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I used JXPath against POJOs for the Validator code that's curently in a pending patch. There are three issue with it, AFACT: - You have to define a top-level POJO representing "/". For example, if I define "EjbJar" as my top bean for the ejb-jar.xml schema, then the XPath /ejb-jar/enterprise-beans doesn't work, but if my top-level bean is "EjbDocument" which has an "ejbJar" property, then the XPath works fine. - You have to translate XML XPaths to POJO XPaths. For example, /ejb-jar/enterprise-beans turns into /EjbJar/EnterpriseBeans - There are a couple of areas where our POJOs don't strictly follow the schema. For example, for method/method-params/method-param*, we have a Method object with a String array called methodParam, instead of a Method object with a MethodParams property with a String array called methodParam. Now, I think all of these adjustments are easy to make, and it was extremely easy to code and debug the JXPath code, so I'm happy to go there myself, but it isn't _quite_ as transparent as if we used XML XPaths on a DOM directly or something like that. Aaron On Tue, 2 Sep 2003, John Rayburn wrote: > Jan Bartel wrote: > > Yes. I believe there is at least one Jakarta xpath-for-POJO project. I > > > don't have any experience with it and I was hoping someone on this > list > > might contribute their evaluation of it. > > JXpath does a great job of allowing XPath queries on POJOs and DOM > objects. We've been using it for several different internal projects > for several months now.