I need to parse a buffer.

I have a working Xerces DOM parser in c++ that parses an XML document.  
I have to migrate that parser to work with a buffer only. I have to pull value pairs 
out of the XML.  The nodename and its value.
I don't want to deal with a .xml file.  Timing in this application does not permit the 
excessive disc I/O that would be required.

In the Xerces download package is a sample - MemParse.  It loads the DTD and XML into 
a buffer and parses it.  It uses a SAX parser.
The problem is that the only thing that this sample outputs is How Many Elements, Time 
to perform the parse, Number of white spaces, Number of Characters - not useful 
information.   I've been single stepping through this code and find no functionality 
in any of the classes that are used that provide the functionality that I derived in 
my working DOM parser.  There is no getName( ) function when you find an element or 
node or child, there is no getValue( ) function.  I don't even see any functionality 
to find a child or element or root in the MemParse sample.
Can someone who has performed such a buffer parsing operation before (and extracted 
more than the useless information that the sample demonstrates) please share the 
methodology used to accomplish this.  

My DOM parser obviously reads the .xml file and puts it into a buffer.  Then IT parses 
what is in that buffer.  Why can't I bypass the file read and jump in to where the 
buffer is already loaded.

I have tried converting buffered file data to the XMLCh type and passed it to the 
parser only to throw parser exceptions.

Ed Purdy
"Minds are like parachutes, they only work when they're open"


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to