Re: generate interface to xml



Petterson Mikael <mikael.petterson@xxxxxxxxxxxxxxx> wrote:

>Hi,
>
>I have a jar that is loaded onto a vm. Is there a way to extract the
>interface information and output it to an xml file?
>
>all hints are very much welcome!
>
>cheers,
>
>//mikael

By "interface" do you mean "java interface" or "user interface" ?
If you mean the latter:

XMLEncoder e = new XMLEncoder(
new BufferedOutputStream(
new FileOutputStream("Test.xml")));
e.writeObject(myUserInterface);
e.close();

(from
http://java.sun.com/j2se/1.4.2/docs/api/java/beans/XMLEncoder.html)

.