locked
Schema validation found non-data type errors. RRS feed

  • Question

  • Is there a way to get the line# and part of schema that has failed validation, I have a very complex schema and very complex appendChild.  I need to see the parser engines error messages. This error message is too generic..

    Can we get the proper msxmldocument parser error message from another interop call somewhere? something like this?

    "Your XML Document failed to load" _
                  
    " due the following error." 
    _
                  
    " Error #: " oXML.parseError.errorCode ": " oXML.parseError.reason 
    _
                  
    " Line #: " oXML.parseError.line 
    _
                  
    " Line Position: " oXML.parseError.linepos 
    _
                  
    " Position In File: " oXML.parseError.filepos 
    _
                  
    " Source Text: " oXML.parseError.srcText 
    _
                  
    " Document URL: " oXML.parseError.url
    )
     

       at Microsoft.MsoOffice.InfoPath.MsxmlInterop.MsxmlDocument.ThrowExceptionFromMsxmlInteropError(MsxmlInteropError eError)
       at Microsoft.MsoOffice.InfoPath.MsxmlInterop.MsxmlDocument.ThrowExceptionFromHresult(Int32 hrError)
       at Microsoft.MsoOffice.InfoPath.MsxmlInterop.MsxmlNodeImpl.AppendChild(String strXml)
       at Microsoft.Office.InfoPath.MsxmlWriter.Close()
       at System.Xml.XmlWellFormedWriter.Close()
       at System.Xml.XPath.XPathNavigator.AppendChild(XmlReader newChild)
       at System.Xml.XPath.XPathNavigator.AppendChild(XPathNavigator newChild)
       at MobileQA.FormCode.CreatePalletColumn(String PalletNumber, String EAN, String ProductCode, String KPIN) in C:\Users\ahernh\Documents\InfoPath Projects\MobileQA5\FormCode.cs:line 1133
       at MobileQA.FormCode.btnAddPallet_Clicked(Object sender, ClickedEventArgs e) in C:\Users\ahernh\Documents\InfoPath Projects\MobileQA5\FormCode.cs:line 968
       at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
       at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)

    Monday, February 7, 2011 3:09 PM

Answers