in our project requirement like this;we have database tables like this Country States City in the jsp forum , fields like this country:........ state:........ city:......... when i submit the FORUM corresponding fields should enter into database as well as should create one xml file like this: <?xml version='1.0'?> <root> <country>india</country> <state>karnataka</state> <city>bangalore</city> </root> when i enter different fields in the forum and enter submit; the xml should overwrite with the previous values like this; <?xml version='1.0'?> <root> <country>india</country> <state>karnataka</state> <city>bangalore</city> <country>india</country> <state>tamilnadu</state> <city>chennai</city> </root> can anybody provide any links how to do this ?can i use xml schema for this application bye chaitu
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
posted
0
So you got two thigns to do on submit event. 1. load to database 2. Write/update XML file For writing to a table. You can use jdbc api to to connect and use any database, A good tutorial is available here. For writing/updating xml. I can think of two options now. 1.Read the database table and create an xml file using simple File IO 2.Create an XML, and edit/modify/remove them using DOM api. IBM has a basic tutorial on understanding DOM Having a schema is is always better for future applicaiton upgrades and maintainability, data exchange and presentations etc., BUT not really necessary.
Originally posted by Balaji Loganathan: So you got two thigns to do on submit event. 1. load to database 2. Write/update XML file For writing to a table. You can use jdbc api to to connect and use any database, A good tutorial is available here. For writing/updating xml. I can think of two options now. 1.Read the database table and create an xml file using simple File IO 2.Create an XML, and edit/modify/remove them using DOM api. IBM has a basic tutorial on understanding DOM Having a schema is is always better for future applicaiton upgrades and maintainability, data exchange and presentations etc., BUT not really necessary.
thank u for ur suggestion?what about JDOM?
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.