Hi, I want to create an XML in blackberry as there are classes for that like Document and Element but i want the xml in String format is it any way to that .Is any API avialable in blackberry for doing the same
+1
A:
There really aren't APIs for creating XML documents in the BlackBerry API. You can sort of fake it by using net.rim.device.api.xml.jaxp.XMLWriter, and manually calling methods as if your program was a SAX parser, but that doesn't really buy you much.
Your best bet for structured XML writing is to use KXML, which is small and runs quickly on BlackBerry. Specifically look at the org.kxml2.kdom package and the org.kxml2.io package (for the KXmlSerializer class).
Anthony Rizk
2009-05-15 12:44:59
I tried KXML but it does not recognizes the XML pullparser interface and not allowing me to compile any other option plz .
Sam97305421562
2009-05-15 13:04:09
Yeah, KXML doesn't include that dependency - I can kind of understand why. Anyway, you can get the pullparser interface from www.xmlpull.org (download the source zip, and just include the 4 files in the java/api folder in your project).
Anthony Rizk
2009-05-15 13:26:24
Hi , I have created XML using KXML but i am facing the issue how to convert that xml to string format just like how transformerFactory works in java but which is not available in blackberry so how to proceed ?
Sam97305421562
2009-05-16 10:17:13
A:
I would advise beginning with JSR-172. If it is not available on blackBerry, Sun's reference implementation is pure java and probably open source as part of PhoneME.
QuickRecipesOnSymbianOS
2009-05-18 10:45:40