This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java Micro Edition and the fly likes kXML users ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "kXML users ..." Watch "kXML users ..." New topic
Author

kXML users ...

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

Are there any kXML users in javaranch ???

I need help ...

Thanks ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
Yes. There are kXML users here, but you should detail the type of help that you need.


Rashid Mayes
http://www.hostj2me.com/ - http://www.worlddeveloper.org/
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Dear Rashid Mayes,

I'm having the following problem : am working on something that basically converts HTML into XML in order to parse it, the thing which is working perfectly. The problem is that i have this tag



which I'm being able to read successfully. Here's where my problem starts, i want to convert the above tag into



Sir, I'm not being able to do this using kXML, meaning, i can't add the attribute value="some value".

Please can you show a snippet that does this kind of stuff ???

Thank you so much ...
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I'm not a kXML user. But when I looked in the API documentation for the product I found there is an Element class and it has a setAttribute method. Those are the things you should use to do that task.
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Yes you are 100% right, but that method is only changing the attribute on the heap, but not reflecting on the XML file itself, so, i need a way to reflect what i have set to the XML file.

Thank you ...
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
OK i solved the problem guys

If anybody wants to know how it was done, please contact me

Regards ...
Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
Hi Vladimir,

Please post the findings you had...

Because someone in the forum will be benefiting today or the other...

In fact i myself am interested in your area, as i am gone to work in kSOAP

so please post your findings


Theepan Thevathasan
SCJP 1.4, SCWCD 1.4, SCMAD 1.0 SCBCD 1.3, MCP(.Net Frm 2.0 App Dev Fdn)
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Dear Theepan,

This is what i have come up with :



For any further questions, please post and ask ...

Best of luck ...
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
There's this small but important question that just raised in mind,

when i use a FileConnection as follows:



Normally it keeps asking for a permission to access the file, so, is there a way to stop it ???

Thank you ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: kXML users ...