I've been trying to display a XML file in a JTree component for a (supposedly) easy way to view and edit a DOM4j document.  I've discovered that the DocumentTreeModel class really doesn't do what I would call an impressive job of displaying the document!  Namespace information, comments, unknown elements, and text nodes are all shown the same way (as leaves, no differentiation between them).  All elements with elements or other information are shown logically as branch nodes.  Attribute data is stored in the tree, but isn't shown in ANY way!  I don't see any way to make good use of it as it is written and I'm quite tempted to create my own TreeModel and CellRenderer then subclass JTree and make it all appear what seems to be logical to me (not completely determined yet).  Anyone else tried to use a JTree to display their documents with success?  I really want to use this as a way to test a bunch of element editing functions that I'm working on, but I don't want to have to re-invent the wheel....
 
 
Chris Golden
_______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to