aspose file tools*
The moose likes Applets and the fly likes Read and Write XML doc in a localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Read and Write XML doc in a localhost" Watch "Read and Write XML doc in a localhost" New topic
Author

Read and Write XML doc in a localhost

binu narayanan
Ranch Hand

Joined: Jul 24, 2009
Posts: 56
Hi everybody,

It will be very helpful if anyone can give me some idea how to read and append to an xml doc placed on my localhost--- Tomcat server


Thanks in Advance


Binu Narayanan
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You put this question in the Applets forum so I assume you are asking how to do that from an applet.

Basically, to read a document from any HTTP server... well, just read this tutorial. Although you said "in a localhost" which isn't a meaningful term, so you might not have meant HTTP. Use of standard terminology would help.

As for appending to an XML document, it doesn't make sense to do that. Appending to an XML document would make it not well-formed.
binu narayanan
Ranch Hand

Joined: Jul 24, 2009
Posts: 56
Hi Paul,

Thank you the link is a Helpful one. I am trying to edit the value of a node in xml doc which is placed in a folder well within the Web application through an applet. An idea would help me achieve this. I have used URL Connections for reading the value from an xml. Now i want to write the edited value back to the same xml doc.



Binu Narayanan
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
That sounds as if you have just an HTTP connection to the server where the XML file resides. In that case you need an active server-side component (like a servlet) where you can post any changes from the applet, and which would then alter the file on the server.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Read and Write XML doc in a localhost