[xsl] Using XSL or SAX to create a DOM object

Subject: [xsl] Using XSL or SAX to create a DOM object
From: Matt Heckel <matt_heckel@xxxxxxxxx>
Date: Tue, 12 Dec 2006 11:51:45 -0800 (PST)
The application I work on receives XML messages that
are used instantiate DOM objects for editing before
storing in an XML database.  It works fine if the
inbound messages are relatively small.  But for large
messages there is too much overhead from creating a
DOM object on the whole message and performance is
problem.

I'm trying to come up with a way to improve
performance.

The inbound messages contain <transaction> tags which
in turn contain <document> tags.  There can be upto
100 <transaction> tags which can each contain upto 100
<document> tags.  Business logic processing is
performed by the application on each individual
<document> tag.

Currently, a DOM object is created for the entire
message and then used to access each of the <document>
tags.  I'm thinking it would be more efficient to
parse the message some other way and create a DOM
object for each of the <document> tags.

Can XSL or SAX be used to 'chunk down' the message to
the <document> tag level and then instantiate DOM
objects for each of the tags?  If so, briefly, what
steps would be involved or could you provide a
reference.  Thanks~




 
____________________________________________________________________________________
Have a burning question?  
Go to www.Answers.yahoo.com and get answers from real people who know.

Current Thread