• Post Reply Bookmark Topic Watch Topic
  • New Topic

Indexing using XML !!  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how XML file can be used as for a caching/Indexing purpose if data is also to be stored in database, then how that file could reduce overhead at the time of web page loading using java n html ??
 
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I regret to state that the question as stated is almost meaningless.

XML markup is a way of formatting a document so that both humans and computers can read and extract information. Java provides a rather complete set of tools for creating and reading XML documents.

You could certainly create an XML document as a summary / cache / index of data stored in a database but whether this would "reduce overhead" depends on what you are trying to do and many other factors.

Bill
 
Prashant Mathur
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:I regret to state that the question as stated is almost meaningless.

XML markup is a way of formatting a document so that both humans and computers can read and extract information. Java provides a rather complete set of tools for creating and reading XML documents.

You could certainly create an XML document as a summary / cache / index of data stored in a database but whether this would "reduce overhead" depends on what you are trying to do and many other factors.

Bill



What you wrote in you last line cache / index, yupp I am discussing about that only, how that could be possible suppose the scenario is that I have to add calendar events that could stored in Database too and xml both now If I have to use xml as cache then whats your say how could be done, suppose if I have to show those calendar entries on web page thru reading it by XML then what could be done suppose last few past entries should be removed and only the recent ones I have to place in xml.

Now tell !!
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prashant Mathur wrote:What you wrote in you last line cache / index, yupp I am discussing about that only, how that could be possible suppose the scenario is that I have to add calendar events that could stored in Database too and xml both now If I have to use xml as cache then whats your say how could be done, suppose if I have to show those calendar entries on web page thru reading it by XML then what could be done suppose last few past entries should be removed and only the recent ones I have to place in xml.

Now tell !!

First: please EaseUp (←click).

I also suggest you view the HowToAskQuestionsOnJavaRanch page. I realize that English may not be your first language, but proper spelling and punctuation are appreciated.

As for using XML as a cache: I'd only do it as a last resort (and probably not even then). It might possibly have some use as a medium for storing the information for a cache; but even that seems a bit redundant if said information is already in a database.

For a Java-based LRU (least-recently-used) cache, you might do well to look at the LinkedHashMap or LinkedHashSet docs.

Winston
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I am not about to write code for you but I have a suggestion:

Don't try to do everything at once - break the problem down into chunks you can experiment with and test in a rapid development cycle.

For example, you might experiment with how to represent your "calendar events" in XML.

Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!