tags:

views:

63

answers:

1

Is there any GWT or GXT (or other library) widget that displays the contents of an XML file as a tree?

Each node of the XML document would be a tree node and the user could expand/collapse the nodes by clicking on them.

Syntax highlighting is also desirable, but that's an extra that I'm willing to live without.

A: 

You might take a look at ext gwt, the asyncXmlTree might be what you are looking for.

//EDIT//

In reply to your comment:

I know now what you are looking for. I don't know if this exists, but it shouldn't be to difficult to adapt the code of the asyncXmlTree.

If you look at the sourcecode of the example, you see that the data is returned by a DataReader. You can implement your own that returns not only the content, but also the xml tags. You could look at the code of the XmlReader for an example.

davyM
I'm using GXT (which is ext gwt, now renamed to sencha) in my project and I know that widget, but that's not what I want. From the documentation, that's a widget... "... which loads its children on demand using a remote service which returns xml."I don't want to load the contents of the tree as XML from a remote service, I just want to display an XML file in the tree.
TNunes