Dynamic XML document builder assistant

Hi!

I am actually working on an Applet that displays an XML document. I would like to add a new functionnality: Create from 'scratch' an XML document that is compliant with a given Schema or DTD. The problem is to build the xml document interactively. For example, the GUI would initially display the root element (JTree) and suggest the possible childs, attributes via a contextual menu for example (right button click on the node). The user woudl be able to build step by step a new document. Therefore, the created XML document should be a valid document.
What would be the best way to retrieve information from Schema or DTD like :
- selected element possible child elements for a given element
- selected element possible attribute
- cardinality information

I would appreciate a lot any suggestion or help that could help me to build such an applet.

Thanks!!

Received on Thursday, 11 March 2004 11:46:29 UTC