I think data transfer is only one of the uses of XML, and limiting XMLs
usefulness to this is unfair.
The most useful use of XML to me is to combine it with XSL and produce HTML.
Let me explain, in a step by step manner.
- Browsers can only view HTML (except IE5, but we'll ignore that for now).
So I want my web application to output HTML viewable in all browsers.
- However HTML is a very BAD format to store data in, as it is very hard to
pull the data out reliably. What I need is a way to separate the data from
the formatting of the data, hence I introduce XSL and XML.
- If I store the data in XML, I now have a very structure method to keep
data, while at the same time being able to access / change / modify it
easily.
- But what is that XSL? You can think of XSL as a stylesheet for XML, it
describes how to display the XML in any format you choose. For this example,
we'll choose HTML. (You could also choose WML for example)
- So we now have our data stored in XML, and our stylesheet in XSL, and
using Java to combine and process these, I can produce cross-browser vanilla
HTML.
Why not just produce the HTML in the first place? Well, I can now change the
way I display my data without recompiling any Java, I just alter the XSL. I
can also have many different XSL files to display the same data in many
different formats, and then use my Java servlet to decide which XSL
stylesheet to use. (eg I might have one display for managers, and one for
normal employees - showing different data).
Having said all that, using XML / XSL to produce HTML is only one other use
of XML, it's just the most useful for me.
Hope this helps clear the issue a bit, let me know if there are any
questions.
Cheers,
Mike
__
| | The BookmarkBox
| | http://www.bookmarkbox.com
|/\| Manage and share your bookmarks online!
Have you seen our new forums? http://www.bookmarkbox.com/ubbcgi
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Jyoti
Parthasarathy
Sent: Wednesday, 8 September 1999 5:55
To: [EMAIL PROTECTED]
Subject: Re: Server-Side Java & XML why?
I have found a tutorial in www.msdn.microsoft.com
http://msdn.microsoft.com/xml/all/ This is the url for the Tutorial on XML
But it is pretty advanced.
As far as how it is used in projects - I think some e-commerce projects use
XMl though I do not know the URL for any such example.
As T mentioned certainly databases are faster - but I think XML is just one
way of transferring data across the net. It is as good as transferring a
view to the database across the web.
As far as I have understood,databases are reqd at both ends(server as well
as client side). Only picking up data from the page and putting it into the
database on the client side is simpler if XML is used.
If somebody has another view plz share it.
Jyoti
-----Original Message-----
From: srinivas [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, September 08, 1999 12:35 PM
To: [EMAIL PROTECTED]
Subject: Re: Server-Side Java & XML why?
yes i too second the same can any1 point to any URl wherein xml is used for
business logic or any tutorials which shall help us to use the XML in a
project.
Thanks in advance forall help
srini
piyush raj jain wrote:
> hI all ..
> sorry for interuption but i'm also not having clear picture ..
> i read many tutorials and docs about xml ...
> but how to start and use it which would give me the feel that really i'm
> getting benifitted with it ..
> somebody can tell me use of xml in project ( step wise )...
> thanx in advance
>
> Jyoti Parthasarathy wrote:
>
> > XML is mainly used for Data Interchange -
> > Since the structure of the XML doc is very strict - on the client side
the
> > data can be just picked off from the page by parsing it.
> > It is good for doing processing on the page - whereas processing a
static
> > HTML page and extracting any Info from it is not easy since there are
no
> > semantics involved and the structure is not strict - unclosed tags may
> > reamin.
> > Hope this answers your question
> > Jyoti
> >
> > -----Original Message-----
> > From: Joona Palaste [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, September 06, 1999 12:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Server-Side Java & XML why?
> >
> > At 01:08 AM 9/6/99 -0400, you wrote:
> > >Hi, I've been doing a lot of research on XML to see if I can use it in
> > >my projects. I've read a lot of material on it for weeks but can
never
> > >understand the purpose of it. I can understand it is good for
> > >standardizing and transferring between external sources. It seems
like
> > >something big but I just don't get it.
> > >
> > >If I'm using java and have a database on my server why would I access
an
> > >XML file to generate a web page, when I can just read from a database.
> > >A database has far more functionality probably faster, and there
doesn't
> > >need to be any parsing. I'm thinking if I'm like eBay, Buy.com or
> > >Hotmail what do I use XML for?
> > >
> > >Can anyone expalin the real-world benefits of using XML?
> >
> > Erm, WML, which is used in WAP phones, is an extension of XML, I think.
> > That
> > should count as a real-world benefit.
> >
> > Joona Palaste
> >
> >
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> > Name: WINMAIL.DAT
> > WINMAIL.DAT Type: unspecified type (application/octet-stream)
> > Encoding: x-uuencode
> >
> >
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html