M
Mark
I get the following error (see stacktrace) while loading
an XMLDocument. The document is huge and it has PI's
created from Arbortext's editor. Works fine when I use
MSXML2 to load the Document. Fails only on .NET
XMLDocument.Load().
Document loads on IE, XML Spy etc. without a problem.
The PI's look like these in the document
<?Pub _bookmark
Command="Alternate"?><?Pub _bookmark Command="Alternate"?
Stack Trace:
============
An unexpected end of file parsing PI has occurred. Line
6089, position 33.
at System.Xml.XmlScanner.ScanPI()
at System.Xml.XmlTextReader.ParseTag()
at
System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities()
at System.Xml.XmlTextReader.Read()
at
System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument
parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc,
XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Test.Form1..ctor()
an XMLDocument. The document is huge and it has PI's
created from Arbortext's editor. Works fine when I use
MSXML2 to load the Document. Fails only on .NET
XMLDocument.Load().
Document loads on IE, XML Spy etc. without a problem.
The PI's look like these in the document
<?Pub _bookmark
Command="Alternate"?><?Pub _bookmark Command="Alternate"?
Command="Alternate"?><?Pub _bookmark Command="Alternate"?<?Pub _bookmark
Command="Alternate"?><?Pub _bookmark Command="Alternate"?><?Pub _bookmark
Stack Trace:
============
An unexpected end of file parsing PI has occurred. Line
6089, position 33.
at System.Xml.XmlScanner.ScanPI()
at System.Xml.XmlTextReader.ParseTag()
at
System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities()
at System.Xml.XmlTextReader.Read()
at
System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument
parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc,
XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Test.Form1..ctor()