• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How to write an XML doc. into the file,which is located in remote server?

Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I have a sample code like this.
URL urlstr=new URL("http://localhost:8080/xmlshop/user_register.xml");
Document document=new SAXReader().read("http://localhost:8080/xmlshop/user_register.xml");
here i am adding some elements into the current document...
URLConnection urlconn=urlstr.openConnection();
XMLWriter writer=new XMLWriter(urlconn.getOutputStream());
I want to write a piece of xml document in a file is located in a remote server.I got no error..but the task was not completed,means not written into the file..what is the bug in the above code?.
It would be nice if anyone give reply for this in the near future.
Thanks in Advance,
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!