views:

352

answers:

1

My application has an XML configuration file which users now edit in a text editor. I want to provide a (Swing) form for editing this configuration. I have a DTD for the XML, but the application does not accept all XML documents validated by the DTD i.e. the application imposes more restrictions than those in the DTD.

I was about to start hacking to see how to go about doing this, but I thought I'd ask around for approaches others have used. Are there libraries out there which generates an editor, given a DTD? Any tips, ideas etc?

PS: My question is similar to this question except that I need a Swing GUI.

+1  A: 

Other than your basic SAX or DOM type libraries, I don't think there is such a solution. It'll probably be a bit difficult to have a one size fits all solution based off of a DTD because the organization of data in XML doesn't necessarily correspond directly with the use or implementation of that data.

jtbradle