David Rohde wrote:

Another way to do it might be.

1. Read the file and remove the very large tree branch.  using fopen,
fread, etc

2. Write this to two separate xml files.  One of these files represents
a header, the other the actual data.

3. Continue to use the library on the header, use an alternative
implementation on the actual data.

This would work, but is a little ugly. Is there a better way?

Perhaps you could you read the input xml file using SAX, and create your DOM from the SAX events. Then your SAX handling functions could skip the BLOB or whatever elements you don't want to load. They could convert the blob to a reference -- that is, store a DOM element that gives the filename and byte offset in the file. Or they could write the blob to another file, and store a reference to that file in the DOM.

Don

Reply via email to