[jdom-interest] Problem with JTreeOutputter
Martin Poepping
ma.p at netcologne.de
Thu Mar 11 01:30:37 PST 2004
Hello,
I've a problem with the output of my XML-File into a JTree.
My code looks like this:
public JTree openXMLFile(File f) {
DefaultMutableTreeNode root = new
DefaultMutableTreeNode(f.getName());
JTree tree=new JTree(root);
outputter = new JTreeOutputter(true);
//root = new DefaultMutableTreeNode("JDOM");
//System.out.println(f.toString());
try {
doc = saxBuilder.build(f);
} catch (Exception e) {
log.statusln("[ERR]: Could not load XML-File into JTree");
e.printStackTrace();
}
outputter.output(doc, root);
tree.setEditable(true);
return tree;
}
On my machine at home (SuSE Linux 9.0, standard installation, eclipse)
everything works fine.
But here at work (Debian, eclipse) instead of a JTree the GUI outputs a
normal text field
with "null"+the content of the xml file. It looks like this:
null<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
A simple XML file from Elliotte Rusty Harold's talk at SD 2000 East
http://www.ibiblio.org/xml/slides/sd2000east/xslt/
-->
<catalog>
<category>
Small chamber ensembles - 2-4 Players by New York Women Composers
</category>
<cataloging_info>
<abstract>Compositions by the members of New York Women
Composers</abstract>
<keyword>music publishing</keyword>
<keyword>scores</keyword>
<keyword>women composers</keyword>
<keyword>New York</keyword>
</cataloging_info>
[............]
====
Well .... who could help me? Whats wrong?
Bye,
Martin
More information about the jdom-interest
mailing list