< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
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 CC: resiprocate-users@xxxxxxxxxxxxxxx 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:
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 ! |