File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Generating XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Generating XML" Watch "Generating XML" New topic
Author

Generating XML

Yogesh Mhatre
Greenhorn

Joined: Feb 15, 2001
Posts: 20
Hello everybody,
In our project we access the database(Oracle) and generate a XML fileat the server end comprising of all tables and coloumns in the databse. Hence forth when the data is accessed and queried the XML file will be contacted instead of database which eats lot of time in connection establishment etc...
The site can be accessed by multiple users and the database can be updated frequntly.There lies the problem we are not sure how/when to update the xml file so as to provide the users with the most updated data.
Yogesh
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
So you are about to design an XML-cache for the data in the DB tables, right?
I suggest you use a DOM tree to actually manipulate the XML document. Just make sure all the mutator methods ( methods that change/update the XML content ) are inside synchornized methods. This way you can be sure concurrent access will not generate garbage.
Hope that helps. I am assuming you have explored the XML support Oracle has in version 8i. If not, its worth a consideration as it can greatly enhance generating XML files from resultsets.

------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Yogesh Mhatre
Greenhorn

Joined: Feb 15, 2001
Posts: 20
hi Ajit,
thnx for ur qiuck reply but i am not still very clear abt ur explanation.In fact i am using a DOM parser to retrive data from the generated XML file, which lifts the data frm the database .I genarate the xml file once but the data in the database may be modified periodically can u uggest any way to syncronize the xml with the database and how frequently to do it.
First of all i would like to know wether the approach i am using is right.
Sorry for the random arrangement of the questions pls bear with me
Yogesh
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
Hi Yogesh
I also am facing the same problem as you are
but you have to find out the way yourself as I also posted the similar query on this forum but of no avail
If i get the solution before you I will tell you
The questions whose answers are difficult are left unattended by sheriff's as yours was left and mine too
Bye
Gaurav
Originally posted by yogesh mhatre:
hi Ajit,
thnx for ur qiuck reply but i am not still very clear abt ur explanation.In fact i am using a DOM parser to retrive data from the generated XML file, which lifts the data frm the database .I genarate the xml file once but the data in the database may be modified periodically can u uggest any way to syncronize the xml with the database and how frequently to do it.
First of all i would like to know wether the approach i am using is right.
Sorry for the random arrangement of the questions pls bear with me
Yogesh


SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
Hi Mhatre

i have found the solution
right now i m completing it but i will tell u later
:cool
prabhu palanisamy
Greenhorn

Joined: Oct 30, 2000
Posts: 27
hi all
i'm also generating the xml files for tables in databases,so unnecessary fetching of databases records is avoided,but the problem which i face is that ,once i update a record or insert i do the same in xml document.the most recently updated xml document is not fetched,its fetching what is in the cache,is there setting in iis to bring the xmlfiles from server each and every time and not from proxy.i hope i'll get a solution
bye
prabhu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating XML
 
Similar Threads
how to get LastModified time of a file system file and webserver file
How to clear Hibernate cache
How to do XML to DB using Message Driven Bean?
Need Help
how to get LastModified time of a file system file and webserver file