Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Read and Write XML doc in a localhost

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
He baked a muffin that stole my car! And this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic