• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

working with java with XML

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ve heard that XML is easier and convenient than database connection for smaller programs. But I dont know how to store, edit, delete, data in a XML file. Please help me
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, I think that XML is a poor substitute for a database for any size program.
 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chaveen, what exactly is your requirement?

As Bear says XML is not a substitute for a database.
 
Author
Posts: 3450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
XML is good for exchanging data between two systems. If you really need to store in an XML, look at DOM Parser, JAXP, JiBX etc.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are plenty of XML and Java tutorials.

Harold has placed this massive and very complete book on line for your reference. It is loaded with examples. You will also need to get familiar with the standard Java library JavaDocs for XML related packages.

Bill
 
Chaveen Ekanayake
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am designing a chat program. I thought a database is too much for a chat program. Is that wrong?? should I use sql
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't think that a chat facility needs any long term storage. If it's the messages that you want to archive, you might consider plaintext files (not XML), since they never change.

Make sure the users of the chat know that their conversations are being stored; that might make it a non-starter for quite a few people.
[ September 15, 2008: Message edited by: Ulf Dittmer ]
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chaveen,
Have you had a look at XMPP (also called Jabber)?

XMPP is an XML protocol for Messaging and Prescence (XMPP = Extensible Messaging and Presence Protocol)

There should be free and open source client libraries and chat servers available for the XMPP protocol. Check here for one example.

On ways to parse XML, you might want to look at StAX too to see whether it suits your requirements.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic