• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Generating XML

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Yogesh Mhatre
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


 
Gaurav Chikara
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mhatre

i have found the solution
right now i m completing it but i will tell u later
:cool
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic