< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] [ParseBuffer - error message during xml parsing]


A quick look at the code in XMLCursor.cxx indicates that is trying to handle comments.  However, the xml parser in resip is pretty basic - I don't think it even handles xml namespaces correctly.  There has been discussions in the past about deprecating it.  If you can post the XML body, then I can try and track this down further when I get a chance.  

Scott

On Tue, May 19, 2009 at 3:07 PM, Jean Grivel <jean1933@xxxxxxx> wrote:
Hi all,

I have found why the exception is thrown. It is because of a comment in the xml content.
 For example: <!-- foo -->.
Does the xml parser (xmlcursor) handle the comments in xml data ?

Thanks.


From: jean1933@xxxxxxx
To: sgodin@xxxxxxxxxxxxxxx
Date: Tue, 19 May 2009 17:27:54 +0200
Subject: Re: [reSIProcate-users] [ParseBuffer - error message during xml parsing]

Thanks for you answer. Actually it is a little difficult to explain.

I have a User Agent Server which receives from another entity, INFO SIP messages

with xml content.

In the UAS::onInfo(InviteSessionHandle is, const SipMessage& msg) function,

I extract the xml content:

Data xmlData = (msg.getContents())->getBodyData();

Then, I call the parser function:

parser(xmlData);

The code of this function looks like:

try

{

XMLCursor xmlc(ParseBuffer(xmlData.data(), xmlData.size()));

if (xmlc.getTag() == "foo")

{

traverse(xmlc);

…..

}

}

catch (ParseException& e)

{

cerr << e << endl;

assert(false);

}

The traverse function is like this one:

this->process(c);

if (c.firstChild())

{

process(c);

c.parent();

}

if (c.nextSibling())

{

process(c);

}

My problem is about an exception thrown in the parser function and also the assertion which fails.




Date: Tue, 19 May 2009 10:57:48 -0400
Subject: Re: [reSIProcate-users] [ParseBuffer - error message during xml parsing]
From: sgodin@xxxxxxxxxxxxxxx
To: jean1933@xxxxxxx
CC: resiprocate-users@xxxxxxxxxxxxxxx

There is not much to go on here.  Can you post a test program that shows this problem?

Scott

On Tue, May 19, 2009 at 10:47 AM, Jean Grivel <jean1933@xxxxxxx> wrote:

Hi all,

I use XMLCursor to parse xml content. My function is something like

parser (Data xmlData). This function is called about every second to parse


the xml data.

After 3 calls, I got this error:

ParseException dereferenced ParseBuffer eof @ ParseBuffer.cxx:1058

Please could you help me solving this problem ?

Thanks in adavance.



Discutez sur Messenger où que vous soyez ! Mettez Messenger sur votre mobile !

_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/



Vous voulez savoir ce que vous pouvez faire avec le nouveau Windows Live ? Lancez-vous !

Discutez sur Messenger où que vous soyez ! Mettez Messenger sur votre mobile !