Click to See Complete Forum and Search --> : XML question
justin2
December 18th, 2003, 03:44 PM
hi,
I dont understand what xml is useful for. I know its good for storing data but i dont see why you dont just but it in plain text format. Also i dont see how to access the information in between the tags using java. any help appreciated.
thanks in advance,
justin
khp
December 18th, 2003, 06:34 PM
The idear behind xml is basically to have a standardized markup language, and some standard api's for accessing the contents of the file.
Of course you could use a simpler text file, to store your data. Which is the best solution depends on the application, and is probably also a matter of taste.
If you would like to start working with xml files in java, you should probably go visit http://xml.apache.org and get xerces and xalan for java.
Xerces provides dom parsing, and comes with a ton of sample programs, while xalan is an xslt processing engine.
Andreas Masur
December 19th, 2003, 12:42 AM
[Moved thread]
highpriest
December 30th, 2003, 05:04 PM
If you give somebody or something information in plain you have to give also the semantics in some other document.
XML is structured, which reflects the semantics (not hole) of entaire information. You can also implement a DTD or XSD to define the semantic of entaire information more precisely.
If you want to understand the semantic of information (while debugging or 10 years later), than the best choise is to represent the information in XML.
If you want the information you send should be processed very fast, than you should represent the information in binary or plain text.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.