File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Splitting of XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Splitting of XML" Watch "Splitting of XML" New topic

Splitting of XML

Hemanth Pallavajula
Ranch Hand

Joined: Oct 07, 2004
Posts: 38

I have an XML which is of size 8 MB. The size of this XML is increasing constantly. For picking up the data from this XML, we are using Castor.

The problem is that it is increasingly becoming very difficult to maintain this XML. And also, the XML is taking huge space in Cache memory as we are loading this XML from database during the server start-up itself.

Now we are looking a solution through which we can:
1. Split the XML into parts (for better maintainance)
2. Occupy less cache size

and still do the castoring for retrieving the data from the xml.

Thanks in advance

Cheers,<br />Hemanth...<br />(When opportunity doesn't knock, build a door.)
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Since you are already "castoring", why not implement some functions that would 'write' the XML file into two or more logical parts. It should be something not overly complicated since you already have the Castor stuff in place.

Or am I completely off the track. :roll:

- m

Take a Minute, Donate an Hour, Change a Life
Sandeep Advani
Ranch Hand

Joined: Mar 11, 2004
Posts: 78
There is also a SAX implementation of XSLT - its a hybrid version called STX. This will help in maintaining the cache size in dealing with this huge XML file without loading it all together.
I agree. Here's the link:
subject: Splitting of XML
It's not a secret anymore!