• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

uses of XML

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay a real basic question or actually three...I hear more and more about XML. What exactly is it? What can I do with it? Should I get into it? Also it seems that XML is often used together with Java..any special reasons?
Sorry to ask these beginner questions
Patrick
 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Extensible Markup Language (XML) describes a class of data objects called XML documents which are stored on computers, and partially describes the behavior of programs that process these objects.
Shivani
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Patrick:
i also had similiar questions not too long back. In a nutshell, XML (X stands for extensible), extends the capability of html.
The tags in html are basically designed for presentation and are fixed by specification. For example, bold, table etc. define how your content will appear in a browser. However html tags give you no clue about the "data" in your content. Nor can you add other tags, or else the browser will be confused.
However, in xml you can make up your own tags and can also define the "grammer" of your tags. If your content is description of a library catalog, you can have tags such as <book>, <author>, <contents> etc.
What makes xml so useful is that it is quite simple and intutive. With the help of commonly available parsers, you can read your documents on any platform: windows, unix, mac etc. Moreover, with the help of stylesheets that go with the xml documents, you can present them in any format that you like (html, text, pdf etc).
So xml is a good choice if you want to collect/exchange data and it can do this in a platform-independent way. Xml can also be used to present this data in different formats. This is becoming an important application of xml: just by having different stylesheets, one can show the same document in a browser or in wireless devices. Xml is also used as "glue", a middleware to connect data from differnet sources.
And your last question, why xml and java go together so well? XML is platform-independent way to hold and transfer data, whereas java provides a platform-independent way to manipulate that data and develop applications that can use/modify the "data" in xml.
Hope this helps. Best way to appreciate and learn it is by applying it in a practical application that you might have. I highly recommend java and xml by brett mclaughlin and am anxious to read the new book by daconta and saganich promoted in this forum.
good luck.
yatin

Originally posted by Patrick Lentz:
Okay a real basic question or actually three...I hear more and more about XML. What exactly is it? What can I do with it? Should I get into it? Also it seems that XML is often used together with Java..any special reasons?
Sorry to ask these beginner questions
Patrick


 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for explaining that so well Yatin, I'd had the same question in mind for a while...
Going further out on the limb of beginner's questions, here's a couple more:
What is meant by parser and how are these used to present XML documents? Where do style sheets come in? (I hava a basic understanding of the use of style sheets in web authoring but haven't any practice with them.)
At work I've run into export/import of database data using SGML, but have no idea how to make use of it. Where can I find out more about these parsers or how to set up a style sheet for exported data?

[This message has been edited by Pauline McNamara (edited March 27, 2001).]
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
test
 
pilania
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please disregard the last message. Just wanted to make sure that my older id still works. Haven't posted on this board for a long time.
Now to answer your question regarding parsers and stylesheets. Here are my 2 cents.
1. Parser: when data is embedded in user defined XML tags there must be mechanism to get the data out of the xml document. Parser (usually) java program does that for you. There are two types of parser SAX/DOM...... and it goes on and on and on and on. Reading a book or going to www.w3schools.com/xml has good tutorial to get you started on that.
2 Stylesheets comes into the picture when we talk about presentation the the data in XML doc. You can very well use CSS or better still XSL. Once again Reading a book or going to www.w3schools.com/xml has good tutorial to get you started on that.
hope this helps
 
pilania
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
test
 
Patrick Lentz
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx a lot for explaining things guys! I understand now why Java and XML go so well together and it looks like I will have to get into it
Patrick
 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic