From raferq at 163.com Thu Mar 26 03:35:55 2009
From: raferq at 163.com (raferq)
Date: Thu Mar 26 04:11:37 2009
Subject: [xsde-users] Would you please have a look at this exception
Message-ID: <30651527.914981238052955118.JavaMail.coremail@bj163app42.163.com>
Hello,
I met a problem when I using XSDe parsing following xml document:
The schema is defined as:
The issue is that, when sector id is NULL, std::exception was threw out instead of xml::exception I supposed. I can't get any useful infomation from this exception. Seems the XSDe will not check the length of hexBinary I defined in the schema which could be checked in my own code when setting values, my question is how can I check if the hexBinary is NULL before std::exception was threw out?
Thanks so much!
Lei, Qiu
From boris at codesynthesis.com Thu Mar 26 05:48:31 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Thu Mar 26 05:58:38 2009
Subject: [xsde-users] Would you please have a look at this exception
In-Reply-To: <30651527.914981238052955118.JavaMail.coremail@bj163app42.163.com>
References: <30651527.914981238052955118.JavaMail.coremail@bj163app42.163.com>
Message-ID:
Hi,
raferq writes:
> My question is how can I check if the hexBinary is NULL before
> std::exception was threw out?
You can check the buffer's size. For example:
void hexBin104Type_pimpl::
post_hexBin104Type ()
{
::xml_schema::buffer* v = post_hex_binary ();
if (v->size () == 0)
{
// empty buffer
}
else
{
...
}
delete v;
}
Boris