It's not a secret anymore!
The moose likes XML and Related Technologies and the fly likes HTML to XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "HTML to XML" Watch "HTML to XML" New topic


Priyha Jootu
Ranch Hand

Joined: Sep 13, 2001
Posts: 47
Hi all,
I want to convert my HTML pages to XML pages. I have a html form called "register.html" which accepts data from user and when submit button is clicked, it calls "insert_user.jsp" which inserts a record in users table and displays "thankyou for registering,... etc etc etc...". I have done all these using HTML and JSP pages.
But now i want to convert all the HTML to XML. How do I convert HTML <form method="post" action="..." > etc etc.. to XML, how do I change other HTML tags to XML?. Should XSL be used to do this? , i donot know how to use it. Also how to use schemas to do this?
I am new to XML , can anybody please guide me how to do this ?
thanks a lot,
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Hi priyha -
Two things. One, please change your name to match our
naming policy.
Two: XML is not a replacement for HTML. It's an extension, or at Least it started out life that way. To do what you want done, it seems a far better idea to start with fundamentals before jumping right into a 'how-to,' especially since you are new at this.
There are several excellent tutorials on the web.

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Mapraputa Is
Leverager of our synergies

Joined: Aug 26, 2000
Posts: 10065
Actually, good well-formed HTML *is* XML. The problem is that most browsers allow "sloppy" HTML, thus encouraging bad habbits. There are tools to "convert" "bad" HTML into "good" (called XHTML), most popular Tidy. You may want to read this article for more information.
But why do you want to convert your HTML to XML in the first place? If you are new to it, you should first learn what it is for, as Michael said, and then decide if you need it or not. W3School tutorial is probably the best place to start.
[ March 11, 2002: Message edited by: Mapraputa Is ]

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Priyha Jootu
Ranch Hand

Joined: Sep 13, 2001
Posts: 47
I had registered to javaranch long back in sep 2001, I registered as priyha jootu, but i donot know how it got changed to priyha. Anyway i corrected it now.
Thanks for the links, it was very useful
I agree. Here's the link:
subject: HTML to XML
It's not a secret anymore!