ValidationEventArgs.Exception.SourceSchemaObject always null!

Here's my problem: I'm validating a XML file that I generate vs a static 
schema file, and am trying to get all the validation errors into a format 
that can be understood by a non-technical user. So I'm registering a 
ValidationEventHandler with the XmlValidatingReader's delegate, and can get 
the ValidationEventArgs just fine. Great.

Problem is that I need to get the specific element out of the 
ValidationEventArgs.Exception object so that I can translate what the problem 
is into plain english for my non-technical users. But the 
ValidationEventArgs.Exception.SourceSchemaObject is ALWAYS NULL!

Grr. Anyone know why this might be? I can't seem to find anyone else doing 
this via web-searches. Nothing on this forum that I can see. Without the 
SourceSchemaObject, I can't tell the user specifically what the problem is 
because I can't get the XML Element that's causing the problem. 

And the ValidationEventArgs.Message is too techincal for my users. I need to 
get the SourceSchemaObject so that I can pass this to another class I've 
created to generate a more user-friendly message.

Anyone? Little help here?

0
Rob3660 (422)
12/19/2005 1:53:02 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
789 Views

Similar Articles

[PageSpeed] 28

Reply:

Similar Artilces:

ADO Exceptions
������: "Tony Tanm" <tony21st@sina.com.cn> ����: One question about ADO ����: 2003��8��22�� 14:48 I use ADO in my application to access database,when I give the parameter ConnectionString of connection's method Open a wrong value(say,data source that doesn't exist),my program will arouse exception, through step debugging, I found that the following code [in msado20.tli file] if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); lead to the exception. I'm puzzled about it. Somebody help me please. Thanks in advance. Tony, you have several opti...

CDHtmlDialog Exception
Any idea why I'm getting this exception the second time that I show a modal dialog with a CDHtmlDialog control on it? Thanks. 0:015> !analyze -v ******************************************************************************* * * * Exception Analysis * * * ******************************************************************************* FAULTING_IP: RPCRT4!CStdProxyBuffer_QueryInterface+a 76b5e134 832300 and dword ptr [ebx],0 EXCEPTION_RECORD: ffffffff -- (.exr ffffffffffffffff) ExceptionAddress: 76b5e134 (RPCRT4!CStdProxyBuffer_Qu...

Outlook 2003 -- Always display BCC on new messages?
Hi all; anyone know how to always display the BCC field on every new message composed, you know, make it the default to display the BCC field? I've played around with forms editing but none of my efforts, which were little more than shots in the dark, have produced the desired results. Thanks, Lucee I forgot to add; when composing a new message, on the View menu the option to check the BCC field is not there as it was in Outlook XP :-( "BVIPrincess" <eecul62@comcast.net> wrote in message news:%23hS3euE$EHA.3820@TK2MSFTNGP11.phx.gbl... Hi all; anyone know how to...

Always Reply in HTML Format
Is there a way in 2003 to reply in HTML always redgardless of what orig message has been sent in? I know the security issues and the reason why its set up the way it is, just curious though. BigZ No. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the SWEN virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, BigZ asked: | Is there a way in 2003 to reply in HTML always | redgardless of what orig message has been sent in? I | know the security issues ...

Always Landscape
No matter what I seem to do or select, every invoice I design comes out Landscape when it actually uses it - I can go in and take a default protrait invoice and save it to a different name and this happens. Please help! try page setup in printer >-----Original Message----- >No matter what I seem to do or select, every invoice I >design comes out Landscape when it actually uses it - I >can go in and take a default protrait invoice and save it >to a different name and this happens. Please help! >. > First, it's Print Setup (atypical for MS I know). Second, there...

Null vs Empty
Hi All, Is Null and empty string the same in Access2003? I used IS NULL and ='' in the WHERE clause. The result is the same. Thanks. Chris No. NULL is null; "" is empty string. If you want to test for both conditions: Is Null Or = "" -- Ken Snell <MS ACCESS MVP> "�Chrissi�" <anubisofthydeath@hotmail.com> wrote in message news:%23V4hjSBEIHA.4748@TK2MSFTNGP06.phx.gbl... > Hi All, > > Is Null and empty string the same in Access2003? I used IS NULL and ='' > in the WHERE clause. The result is the ...

How can I make an Option Group start as Null?
Access 2003 Windows XP On my form "frmCustOrds" I have an option group in a frame "fraSpecAtt" with two buttons "optYes" (Option value -1) and "optNo" (Option value 0). When a new Customer Order is added, I need to have this option group come up with a null value, that is, with neither button filled. "fraSpecAtt" has as its Data "SpecFormAtt" which is a "Yes/No" data type. I have tried many things including: 1) Having the default value on the table be "Null" 2) Having the default value on the form be "Null&qu...

Exception from HRESULT: 0x80040E2F
We have a custom task list that seems to get this error when trying to update a list item that only has a user assigned to that task. When there is no user assigned you can update the list item and attach the file. We have ran a sync against AD and nothing has worked so far. ------=_NextPart_0001_8D145796 Content-Type: text/plain Content-Transfer-Encoding: 7bit Restart the below services and then try: � Windows SharePoint Services Timer � Windows SharePoint Services Administration � Windows SharePoint Services Tracing ------=_NextPart_0001_8D145796 Content-Type: text/x-r...

Updates were not accepted (exception 4005). Soap exception.
Hi all, when the report is submitted from Outlook 2003 to Project Server 2007 the folowing error message is displayed (see the subj). However, the data are being sent and can be seen in PWA. At the same time, the user gets an email message from Project Server: "Project server returned error code -1". What's wrong with the Server or client? where to look for? Please advise. Elena ...

Form Always on Bottom
I have a primary form set up, from which all other forms and actions occur depending on the user and what they are doing. The primary form is large, (filling the screen but not maximized), and all of the other forms that can come up are relatively small. Is there a way to keep my primary form on the bottom? As in the reverse of 'Always on Top'. I have no concern that it will get completely covered and inaccessible, as it is easily larger than all of the other forms combined, and none of the forms can be resized at all. I do however have a concern that the user will click on the...

Exception thrown in ME
I have made a custom control class, CFontSample, and registered it with the following code. It all woks fine on my main PC running XP, but when I check it on my laptop running ME, the exception is thrown with the 'Required resource was unavailable' message. Any ideas? Is there some file I need to copy over to the laptop? Greg Chapman BOOL CFontSample::RegisterWndClass() { WNDCLASS windowclass; HINSTANCE hInst = AfxGetInstanceHandle(); //Check whether the class is registerd already if (!(::GetClassInfo(hInst, FONT_SAMPLE, &windowclass))) { //If not then...

Unexpected exception is thrown while deleting an exception
Hi I am using TRY CATCH macros in my code. the general pattern looks like this: TRY { } CATCH (CDBException, e) { //here I am capturing error msg... e->Delete(); return; } The thing is that the program crashes with unhandled exception during an exception delete part. I can not determine if it is in the line e->Delete() or it happens when it exit from teh CATCH block, and there is an auto-delete exception proccess as i am using TRY CATCH macros. I have limitations to debug as this application lies on a customer server and we can't produce the failure (it happens from ...

Report Writer
Whenever I return from Report Writer to GP (version 9, SQL 2000) I get the following warning: Unhandled script exception: Object has no reference. EXCEPTION_CLASS_SCRIPT_BAD_PARAM I click on 'Ok' and everyhting moves along fine after that. Anybody else experiencing something like this? Regards BeerMan I have the same problem but don't have a solution. I solved this by manually populating dynamics..AAG00104 with company data. The data you need can be found in PA00020. Solution to the mistery: There are two steps that need to be taken for the "Analitycal Accounti...

private res property ValidationEventArgs
Hi, I know there's a way to check the private res property of the ValidationEventArgs class, using reflection. There are number of possible values for this (string) property, for example Sch_ElementValueDataType, Sch_UndeclaredElement, Sch_MinLengthConstraintFailed etc. However when validating my xml against a schema this res property is always Sch_ElementValueDataType when for example the minlength is not reached. It would make sense to me if it returned Sch_MinLengthConstraintFailed which is a more detailed "description" of the error. Can anyone help me fix this problem? Gre...

Outlook 2007 CRASHing ALWAYS
I find office 2007 to be an exciting new product to work with. However, as there is always a however and much to dismay whenever I attempt to work with Outlook 2007 it crashes! I have already removed the adobe add-in, even went as far as to disable my mailguard feature as per what I had seen in my sojourn searches in google that it could have been the problem. However I am still experiencing crashes and possibly may uninstall outlook 2007 and install only 2003, if it'll let me. Any thoughts? Thanks in advance! Aiandas P.S. I have XP SP2 P4 2.8 machine with 3 gigs of memory. I hav...

Delay Delivery not always working
We also have some problems with this. It doesn't seem to matter what version of Outlook client - for some it'll work and others it won't.. Any solutions/suggestions? Saw that the user below posted in late December and hasn't received an answer.. Is it a bug? "Teresa Akers" <anonymous@discussions.microsoft.com> wrote in message news:<013a01c3c979$7213c570$a101280a@phx.gbl>... > Delay send isn't working correctly. User creates a > message, clicks on Options, and selects Delay Send until > after date/time. The date/time passes (by a few hour...

I got dozens of first chance exception of type "Access violation exception" in the CDialog::Create
I derive my own CMyDialog class from CDialog,and got may first chance exception in the Output Window, but the program run fine. does these exception really not matter? How can i get rid of them? Do like we all do: ignore them. joe On Tue, 29 Jun 2004 13:32:57 +0800, "booker" <rekoob@163.net> wrote: >I derive my own CMyDialog class from CDialog,and got may first chance >exception in the Output Window, but the program run fine. > >does these exception really not matter? >How can i get rid of them? > Joseph M. Newcomer [MVP] email: newcomer@flounder.co...

cannot save word file except tmp
I opened a word file I already worked before and updated and saved it - it is normal so far. After keeping working for a while, when I tried to save it, I got a message saying I cannot save it. The existing file name, while it is still open and i am working now, is suddenly changed to "xxxx.tmp". I had to save as with other name. I used MS Word 2007 Enterprise and worked under 2007 Office Groove. Any comments are welcome. Thanks, ...

How do I force a line chart to not plot cells that are "null".
These cells are not empty, as they have an IF statement in them to force a "null", so the setting in Options, to not plot empty cells, is not working. Any ideas? Hi, When the cell is not truly empty then something is plotted. See here for the various combinations of cell content and line appearance and possible work arounds. http://tushar-mehta.com/excel/software/na_discontinuity/index.html http://www.andypope.info/charts/brokenlines.htm Cheers Andy Tania wrote: > These cells are not empty, as they have an IF statement in them to force a > "null", so the set...

Join to get "exception" records
I have two queries Q1 and Q2 which have a common ID field. I want to get the records of Q1 except those where the ID exists in Q2. Is there a way to do this? TIA The Query wizard includes an "unmatched query" that will do what you are asking for. -- Hope that helps! RBear3 .. <john@john.com> wrote in message news:46310F54.2030007@john.com... >I have two queries Q1 and Q2 which have a common ID field. > I want to get the records of Q1 except those where the ID > exists in Q2. > > Is there a way to do this? > > TIA Cool! Thank you! RBear3 wrote:...

null date issue when using findfirst
hey all, I'm using a listbox that displays the number, organization, name and date from a distribution table. unfortunately, there is no key column (for various reasons) so i've modified the underlying code for the AfterUpdate action so it looks for the record matching all 4 fields in the listbox. However, I run into a problem where there is no date filled in, I get a syntax error. How can Imodify my code below to include the field, as it is vital in some cases, but not get an error where there is no date? Thanks in advance!!! "aft3rgl0w" <aft3rgl0w@discussions...

outlook always uses same account to send emails
Hey, I'm using office 2003 SP1. In outlook I have correctly configured 6 email accounts. Since about a month of 5 almost every mail I send is send with the same account even if I change the account in the new message window or when I reply on a mail from a different account. So now it is not possible to send an email from one of the other 5 accounts. Does anybody know the cause of this problem? grt, Lieven Hi Lieven, Outlook 2003 allows you to choose which account you wish to reply from when you reply or create a new message. It displays an accounts menu option (next to send) ...

DispatchMessageW Exception
Our application is built by VS2005 in Visual Basic and run under dotnet framework 2.0. In the past few months, the application will abort randemly with the exception caught before and message "Faulting application hxmain.exe, version 2.0.3707.19991, stamp 4b849822, faulting module msvcr80.dll, version 8.0.50727.1433, stamp 471eb5ae, debug? 0, fault address 0x0001500a." reported in eventlog. The stack trace can't tell us where the application abort Exception Source: System.Windows.Forms Exception Type: System.AccessViolationException Exception Message:...

ValidationEventArgs.Exception.SourceSchemaObject always null!
Here's my problem: I'm validating a XML file that I generate vs a static schema file, and am trying to get all the validation errors into a format that can be understood by a non-technical user. So I'm registering a ValidationEventHandler with the XmlValidatingReader's delegate, and can get the ValidationEventArgs just fine. Great. Problem is that I need to get the specific element out of the ValidationEventArgs.Exception object so that I can translate what the problem is into plain english for my non-technical users. But the ValidationEventArgs.Exception.SourceSchemaOb...

Winsock try catch exceptions
Hi, I use the Winsock ActiveX in VS C++. the problem is that I am unable to catch all the exceptions. for instance if I have a server who listens at port 1111 and I try to connect to the wrong port or if the server is offline I get error messagebox "connection is forcefully rejected". it seems that I can't catch that message somehow. here is the code I use: TRY { WinSockControl.SetProtocol(0) ; // TCP/IP WinSockControl.Connect(COleVariant("127.0.0.1"), COleVariant(long(1321))) ; } CATCH(CException, e) { MSGDialog("ddddddddddddd"); e->Dele...