axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadir Amra <a...@us.ibm.com>
Subject Re: Problems with XMLParserXerces
Date Sat, 12 Aug 2006 14:13:41 GMT
I have fixed this problem.  See  AXISCPP-770  for details.  Please try and 
see if your problem persists by downloading code and testing.

Nadir K. Amra


Kamlesh kumar <kamaal79@yahoo.com> wrote on 08/11/2006 09:41:21 PM:

> The current implementation of XMLParserXerces ignores
> the  value returned by the parseNext() call, this
> causes the program to crash the next time parseNext()
> is called. 
> 
> Here is a sample code inside the peek function
> illustrating the problem. 
> 
> AnyElement* elem = m_Xhandler.getAnyElement();
>         while (CHARACTER_ELEMENT == elem->m_type) /
>         { /* ignorable white space */
>             m_Xhandler.freeElement();
>             bCanParseMore =
> m_pParser->parseNext(m_ScanToken);
>             elem = m_Xhandler.getAnyElement();
>          }
> 
> It has two problems one it ignores the value of
> bCanParseMore and secondly it doesn't check if elem is
> null or not before entering the while loop again. 
> 
> Ideally, once the parser returns a value of
> false(indicating the end of stream) we shouldn't be
> calling parseNext() function. I think it would be
> better to have a class member variable called
> m_bCanParseMore which we check before making any call
> to parseNext function. This would avoid the problem.
> 
> I run into this situation more often as I am using the
> SoapDeSerializer API directly. I see someone else have
> also faced this problem 
> http://mail-archives.apache.org/mod_mbox/ws-axis-c-dev/200507.mbox/%
> 3C256180486.1122544765692.JavaMail.jira@ajax.apache.org%3E
> 
> Can someone take a look into XMLParserXerces.cpp and
> fix this problem ?
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message