1
Vote

Validate crashes if document contains altChunk

description

Apparently it attempts to treat it as an XML document, while it can be several types of document: html, xml or in my case: docx.
 
This is the exception:
Data at the root level is invalid. Line 1, position 1.
 
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(Stream inStream)
at PackageExplorer.AddIns.ValidationInspector.DefaultValidationService.ValidatePart(DocumentPart documentPart, XmlSchemaSet schemas) in C:\Documents and Settings\Wouter\My Documents\Visual Studio 2005\Projects\PackageExplorer\PackageExplorer.AddIns.ValidationInspector\DefaultValidationService.cs:line 84
at PackageExplorer.AddIns.ValidationInspector.DefaultValidationService.Validate(DocumentPart documentPart) in C:\Documents and Settings\Wouter\My Documents\Visual Studio 2005\Projects\PackageExplorer\PackageExplorer.AddIns.ValidationInspector\DefaultValidationService.cs:line 62
at PackageExplorer.AddIns.ValidationInspector.ValidateDocumentPartCommand.Execute() in C:\Documents and Settings\Wouter\My Documents\Visual Studio 2005\Projects\PackageExplorer\PackageExplorer.AddIns.ValidationInspector\ValidateDocumentPartCommand.cs:line 39
at PackageExplorer.UI.Menu.ToolStripMenuItem.OnClick(EventArgs e) in C:\Documents and Settings\Wouter\My Documents\Visual Studio 2005\Projects\PackageExplorer\PackageExplorer\UI\Menu\ToolStripMenuItem.cs:line 62
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

comments