Wednesday, January 2, 2008

Java + XML

I have a certain text, which is basically an template for our CMS at work. This text needs to be edited and written in notepad or any other texteditor. What I would like to do, is have an nice GUI, where I just select the specifics, and it generates the requiered text from that. So for instance, just fill in the partnumber, after which the program would generate the complete text which I can then just copy/paste in our CMS.

So I would use JTextFields, and maybe Combobox etc. But what to do with those values? The most flexibel option would be to have each change of each value updated seperately in the "template". But I have not found a way to edit a certain text in an JTextArea.

The way to go? Write each value to an XML file, and use that XML file to create the "template" in an JTextArea/Pane/whatever.

So now I have to get into XML, and I am going to start here: http://developerlife.com/tutorials/?p=26 and http://www.cafeconleche.org/books/xmljava/.

And some more links: http://www.onjava.com/pub/a/onjava/excerpt/netbeans_2/index2.html and http://www.netbeans.org/kb/55/xmltools-openingsample.html

No comments: