| Author |
Indexing using XML !!
|
Prashant Mathur
Greenhorn
Joined: Jul 19, 2011
Posts: 21
|
|
|
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 ??
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
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
|
Java Resources at www.wbrogden.com
|
 |
Prashant Mathur
Greenhorn
Joined: Jul 19, 2011
Posts: 21
|
|
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 !!
|
 |
Winston Gutkowski
Bartender
Joined: Mar 17, 2011
Posts: 4901
|
|
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
|
Isn't it funny how there's always time and money enough to do it WRONG?
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
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
|
 |
 |
|
|
subject: Indexing using XML !!
|
|
|