Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

kXML users ...

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Are there any kXML users in javaranch ???

I need help ...

Thanks ...
 
Rashid Mayes
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. There are kXML users here, but you should detail the type of help that you need.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK i solved the problem guys

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

Regards ...
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic