Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
thinkerRay
Posts: 16
Registered: ‎06-27-2012
My Device: 9900

java.xml Transformer and TransformerFactory class unavailable

Hi everyone,

 

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.

 

Thank you,

Ray

Please use plain text.
Contributor
MarkyC
Posts: 16
Registered: ‎06-27-2012
My Device: Bold 9900

Re: java.xml Transformer and TransformerFactory class unavailable

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.

Please use plain text.
Contributor
thinkerRay
Posts: 16
Registered: ‎06-27-2012
My Device: 9900

Re: java.xml Transformer and TransformerFactory class unavailable

Hi dear,

Thanks man alot. But I still cant find "XMLSerializer". What would you suggest. :smileysad: It seems I need to update my JDK 7.1.0.5 but I dont know how. All what I have now is JDK SE.

Any ideas

Please use plain text.
Contributor
MarkyC
Posts: 16
Registered: ‎06-27-2012
My Device: Bold 9900

Re: java.xml Transformer and TransformerFactory class unavailable

[ Edited ]

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.

Please use plain text.
Contributor
thinkerRay
Posts: 16
Registered: ‎06-27-2012
My Device: 9900

Re: java.xml Transformer and TransformerFactory class unavailable

Thanks man for your time

you saved me :smileyhappy:

Please use plain text.