I have created project management software with Java and MySql and it works fine. This applet gets and writes information directly to MySql database.
Problem is that those sqlClauses below(update and insert) should go "through" xml "document" and i haven�t got idea how to do that. If someone could give me advices or even tell me how I must modify my code I would be very grateful.
My english is not so good, so my problem sentence could be little hard to understand, but please try. If it�s too hard to understand please tell me even how can i save results of those clauses to xml "document". (soap?)
Here is part of main program:
And here is database connection class which i have created:
[edited to disable smilies - in the future, you can do it by clicking the disable smilies button in the options section (near the bottom) of the posting page] [ August 09, 2004: Message edited by: Jeanne Boyarsky ]
Welcome to JavaRanch. Your English is fine - certainly a lot better than my ... um ... give me a clue ... somewhere in Scandinavia or around the Baltic? Anyway, it's better than any of my foreign languages!
It would be easier to help if you could give us an idea of why you want to save the data as XML and in MySql. Or why you want to convert to XML as an intermediate stage.
A simple answer to the question I think you're asking is to make sure that your data container class conforms to the JavaBeans specification (read the docs if you're not familiar) and then just use the java.beans.XMLEncoder class to write to a file. See example:
If you need to do something more complicated than that then you'll need to look at using JAXP. Check out the tutorial on Sun's website.