HI, You need to configure the DocumentFactory for the reader, so that it generates the required node types
Look at the way that you create your SAXReader Mike > -----Original Message----- > From: Stamatis Karbounarakis [mailto:[EMAIL PROTECTED] > Sent: Friday 27 June 2003 10:24 > To: [EMAIL PROTECTED] > Subject: [dom4j-user] DatatypeElement > > > Hello. I am copy/pasting five lines of code from chapter 7 of > the dom4j > cookbook: > > Document schema = return reader.read(xmlFile) > XPath xpathSelector = > DocumentHelper.createXPath("xsd:schema/xsd:[EMAIL PROTECTED]' > Address']/ > xsd:structure/xsd:[EMAIL PROTECTED]"); > List xsdElements = xpathSelector.selectNodes(schema); > > for (int i=0; i < xsdElements.size(); i++) { > DatatypeElement tempXsdElement = (DatatypeElement)xsdElements.get(i); > > > I am trying to do the same thing with my xml file to handle > elements as datatype element but I get an ClassCastException. > What's the catch? > > Thank you > > Stamatis > > > > > > --__--__-- > > _______________________________________________ > dom4j-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/d> om4j-user > > > End > of dom4j-user Digest > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU > Hosting Partner. Refer Dedicated Servers. We Manage Them. You > Get 10% Monthly Commission! INetU Dedicated Managed Hosting > http://www.inetu.net/partner/index.php > > _______________________________________________ > dom4j-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/d> om4j-user > ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user