Hi all; I was asked by a number of people offline to let them know the results of this - so I'm just sending an email back out to all.
The bottom line is basically there is no simple/obvious way to do this. I have no idea why they spec'ed it this way but the node "/root" in xpath is root with no namespace - not root with the default namespace. So aside from contortions like the one below - you can't have a node suing the default namespace in an xpath statement. As to why it was designed this way - no idea. - dave David Thielen 303-499-2544 www.windwardreports.com -----Original Message----- From: David D. Lucas [mailto:[EMAIL PROTECTED] Sent: Monday, July 18, 2005 5:30 PM To: David Thielen Cc: dom4j-user@lists.sourceforge.net; dom4j-dev@lists.sourceforge.net Subject: Re: [dom4j-user] xpath with default namespace Dave, Take a look at http://www.purpletech.com/xpe/ . XPE is a nice tool to help you decide the correct xpath expressions. It looks like you should use something like "//*[local-name()='data']" to find a list of elements named "data" with any namespace. Later, Dave -- +------------------------------------------------------------+ | David Lucas mailto: ddlucas @ lse.com | | Lucas Software Engineering, Inc. (740) 964-6248 Voice | | Unix,Java,C++,CORBA,XML,EJB (614) 668-4020 Mobile | | Middleware,Frameworks (888) 866-4728 Fax/Msg | +------------------------------------------------------------+ | GPS Location: 40.0150 deg Lat, -82.6378 deg Long | | IMHC: "Jesus Christ is the way, the truth, and the life." | | IMHC: "I know where I am; I know where I'm going." <>< | +------------------------------------------------------------+ Notes: PGP Key Block=http://www.lse.com/~ddlucas/pgpblock.txt IMHO="in my humble opinion" IMHC="in my humble conviction" All trademarks above are those of their respective owners. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev