Hi Dave,
Thanks a lot for the answer.
I figured as much as, the reading the xml document and creating the
DOM Tree would be non-recursive, but i was concerned about the
Validation part. 
Unfortunately, my program is crashing if the depth of the DOM Tree
is around 3000. I was thinking this would be a stack overflow.
But if it is not, then i need to build a debug library and debug
it.

Thanks again.
renin.


> -----Original Message-----
> From: David N Bertoni/Cambridge/IBM [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 21, 2003 12:25 PM
> To: [EMAIL PROTECTED]
> Subject: RE: XercesDOMParser::parse() - Is this Recursive?
> 
> 
> 
> 
> 
> 
> Hi Renin,
> 
> The parser doesn't traverse a DOM tree.  It parses an XML stream 
> and builds
> a DOM from that stream.  Most of the information that maintains the state
> of the parse is not kept on the stack, and the parser is not implemented
> using recursive descent -- it's a state machine.
> 
> Dave
> 
> 
> 
>                                                                   
>                                                          
>                       "Renin Jegadeesan"                          
>                                                          
>                       <renin.jegadeesan@         To:      
> <[EMAIL PROTECTED]>                                    
>                       smarts.com>                cc:      (bcc: 
> David N Bertoni/Cambridge/IBM)                             
>                                                  Subject: RE: 
> XercesDOMParser::parse() - Is this Recursive?                
>                       03/21/2003 07:20                            
>                                                          
>                       AM                                          
>                                                          
>                       Please respond to                           
>                                                          
>                       xerces-c-dev                                
>                                                          
>                                                                   
>                                                          
> 
> 
> 
> I am sorry i wasn't clear. I understood from the code that it's not
> re-entrant.
> 
> what i meant was, does the XercesDOMParser::parse() traverse the DOM
> Tree in a recursive manner?
> 
> since my program is multi-threaded, i am worried if this traversing
> is done in a recursive manner, the depth of the DOM tree would be
> constrained by the stack size for this thread, and if the DOM Tree
>  is deep enough, then my program would crash.
> 
> Thanks again, for any help.
> renin.
> 
> 
> > -----Original Message-----
> > From: David N Bertoni/Cambridge/IBM [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 20, 2003 7:05 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: XercesDOMParser::parse() - Is this Recursive?
> >
> >
> >
> >
> >
> >
> > HI Renin,
> >
> > If you mean "re-entrant" the answer is no -- a single instance of a
> parser
> > can only parse one document at a time.  See:
> >
> >    http://xml.apache.org/xerces-c/faq-parse.html#faq-7
> >
> > Dave
> >
> >
> >
> >
> >
> >                       "Renin Jegadeesan"
> >
> >                       <renin.jegadeesan@         To:
> > <[EMAIL PROTECTED]>
> >                       smarts.com>                cc:      (bcc:
> > David N Bertoni/Cambridge/IBM)
> >                                                  Subject:
> > XercesDOMParser::parse() - Is this Recursive?
> >                       03/20/2003 03:29
> >
> >                       PM
> >
> >                       Please respond to
> >
> >                       xerces-c-dev
> >
> >
> >
> >
> >
> >
> >
> > Hi,
> > I am a newbie at using Xerces C++. I have written a multi-threaded
> program
> > that uses the XercesDOMParser to parse my xml document.
> >
> > I am wondering if the XercesDOMParser::parse() is recursive? I looked
> > at the source code, and it appears to be non-recursive. But the source
> > code is really complicated, and i would appreciate it, if one of the
> > experts on this mailing list can answer this question for me.
> >
> > Thank you in advance,
> > - Renin
> > (914) 798-8561
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

Reply via email to