Hi David,
It's ok now, thanks for your help.
But I have another problem, when I do this:

XPath xp=DocumentHelper.createXPath("//rect");
List list=xp.selectNodes(document);
 
the list is empty but it should not, because there is rect elements in my xml file.
And if I use this:
 
XPath xp=DocumentHelper.createXPath("//*[name()='rect']");
List list=xp.selectNodes(document);

the list is not empty. And i think the expressions: //rect and //*[name()='rect'] are equivalent, or am i wrong??
 
Thanks for your help.
Bader
 
On 8/19/05, David Thielen <[EMAIL PROTECTED]> wrote:

You need jaxen.jar too.

 

David Thielen

303-499-2544

www.windwardreports.com

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of bader houmad
Sent: Thursday, August 18, 2005 6:18 AM
To: dom4j-user@lists.sourceforge.net
Subject: [dom4j-user] getting started with dom4j

 

Hi,

I am new to dom4j.

I tried to to use it in a simple example:

153   SAXReader reader= new SAXReader();
154   URL url = "" URL(" file:///C:/Documents and Settings/Bader/Bureau/gradien.xml");
155   Document document = reader.read(url);
156   XPath xp=DocumentHelper.createXPath("//test:Symbol");
157   List list=xp.selectNodes(document);
   

but it did not work, i got the follwing Exception stack trace:


Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jaxen/JaxenException
 at org.dom4j.DocumentFactory.createXPath (DocumentFactory.java:230)
 at org.dom4j.DocumentHelper.createXPath (DocumentHelper.java:121)
 at Viewer.FSViewer.UpdateFrame(FSViewer.java:156)
 at Viewer.FSViewer.access$0(FSViewer.java:133)
 at Viewer.FSViewer$1.actionPerformed (FSViewer.java:76)

can somebody help me?

Thanks in advance


Reply via email to