06-27-2012 10:04 PM
This is my first topic and I wish if you can help me brothers.
I have installed JDK 7.0, last version but still I cant find java.xml.Transformer and TransformerFactory.
All what I want is to update xml and save updated info on nodes back to file.
Any help please.
06-28-2012 01:04 AM
I'm not sure if there's an easier way than using DocumentBuilder, being that I am a newbie Java and Blackberry developer It appears there is no Transformer class in JavaME. Java-Samples.com has a nice tutorial that can teach you the basics of DocumentBuilder and SAX (both are supported by JDK 7), both reading in from xml, and writing out xml files.
06-28-2012 01:17 AM
Thanks man alot. But I still cant find "XMLSerializer". What would you suggest. It seems I need to update my JDK 18.104.22.168 but I dont know how. All what I have now is JDK SE.
06-28-2012 01:29 AM - edited 06-28-2012 01:31 AM
Looks like that also doesn't come free in the BB JDK. I did a little bit of research for you, and found there was a SO thread with the same problem you're having!
The top answer suggests using an (open source) 3rd party library called kXML, which gives you create/change/edit functionality for free. He even went as far as to link to directions on how to integrate into your project! But if you want to go the manual way, the second answer suggests using the built-in XMLWriter class.