How can I convert Java file into an XML file

I have a requirement to save a GUI screen developed in Java as UIML(it is xml based language). So could anybody help me with how to do this transformation.thanksJhonMathew
[199 byte] By [JohnMathewa] at [2007-11-26 15:21:59]
# 1
Is it graphic image displayed on screen that you want to save (to use it in a design doc etc..) or is it the GUI object ?If it is GUI object to be saved/converted to XML then - You can use JAXB to convert these objects into XML.
java_a at 2007-7-8 21:36:58 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Actually UIML is XML based technology which is used to represent language independent User Interface. It stores all the information like what all comopnents are present where they are located on screen and what action is called when user clicks on some items on screen like button.

All this information is stored in structured manner in XML(UIML). So if we have UIML representation of some screen then we can render it in any GUI specific language like HTML, WML, swing etc using language specific renderers and transformers.

In my case I have swing screen and I have to transform all that information in UIML. Could you please let me know how to start on this

johnmathewa at 2007-7-8 21:36:58 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...