June 15th, 2001, 01:51 PM
HTML to XML?
Hi there, I'm new to this forum and had a question.
I'm working on a school assignment and would like to know if it's possible to do this with JSP/Java;
a user fills in an HTML form to purchase or sell a comic book. They do this in their browser, when done they click submit.
At the receiving end (say a large comic book store that buys/sells collector issues) a JSP script takes the data, parses it (using DOM? SAX?) and creates an XML form with tags and places the previously entered data into the right slots. Then the receiver can either print the XML sheet or transmit it to another web site. What would be ideal would be to have a repository to receive these requests and then other stores could view it to see if they have that issue to buy or sell.
If it's possible to do this, what code would I put, and would it be in the form page or as a separate file on the server? What parser do I use that can accomplish the task? Can it create an XML document on the fly or do I need the document already created? The assignment also requires it to have an external DTD, so would I need to have the XML and DTD on the machine?
The reason I want it to go to an XML document is that's what the assignment requires. So I didn't get into putting it to a database like MySQL although I would like to hear from people on how I could do that and still keep the XML sheet.
Any help would be great. Thanks. g
June 22nd, 2001, 06:42 AM
You can use SAX parser for JSP.
Can it create an XML document on the fly or do I need the document already created? The assignment also requires it to have an external DTD, so would I need to have the XML and DTD on the machine?
Yeah, It is possible to create xml document on fly.DTD should be in same system...about Jsp coding ,some tutorial might be out there on net regarding same topic(you may search for that)..