I have just started using the Datatype support in dom4j. When the code below runs, the call to getData does not set the value of the element (and calling getData afterwards throws an exception). When stepping into setData with a debugger, it steps into AbstractElement, which has the method below for getData:
public void setData(Object data) {
// ignore this method
}
It looks like I have something set up wrong? Any help is appreciated.
Craig
=========================================================================
DatatypeDocumentFactory docFactory=new DatatypeDocumentFactory(); docFactory.loadSchema(schema);
QName simpleListQName = docFactory.createQName("SimpleListDescriptorType", "smp-lst", "descriptor-simple-list.xsd" );
Element root = docFactory.createElement( simpleListQName );
root.addNamespace( "xsi", "http://www.w3.org/2001/XMLSchema-instance");
root.addAttribute( "xsi:schemaLocation", "descriptor-simple-list.xsd");
Document document = docFactory.createDocument( root );
QName keyQName = docFactory.createQName("key", "smp-lst", "descriptor-simple-list.xsd" );
Element keyElement = docFactory.createElement( keyQName );
keyElement.setData( new Long( 1 ) );
------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user