473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

XML.NET unexpected EOF error on Processing Instructions

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"?
<?Pub _bookmark Command="Alternate"?><?Pub _bookmark Command="Alternate"?<?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.ParseBeginTagExpandCharEn tities()
at System.Xml.XmlTextReader.Read()
at
System.Xml.XmlValidatingReader.ReadWithCollectText Token()
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()
Nov 20 '05 #1
1 2979
Mark,
Which version of .NET? VS.NET 2002 (.NET 1.0) or VS.NET 2003 (.NET 1.1)?

Do you have a small (10 or 15 node) sample you can include that demonstrates
the problem? (Not just the processing instructions, but a handful of the
other nodes also, a complete document that is under 25 nodes.

Hope this helps
Jay

"Mark" <an*******@discussions.microsoft.com> wrote in message
news:6b****************************@phx.gbl...
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"?
<?Pub _bookmark

Command="Alternate"?><?Pub _bookmark Command="Alternate"?
<?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.ParseBeginTagExpandCharEn tities()
at System.Xml.XmlTextReader.Read()
at
System.Xml.XmlValidatingReader.ReadWithCollectText Token()
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()

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Dominic Olivastro | last post by:
Hi all: I'm new to this newsgroup, and new to XML. We receive documents in XML, and I am trying to tear them apart to obtain information. I decided that, for my purposes, it would be fairly...
4
by: | last post by:
Some time ago I installed VC# 2003, made a small generic project, compile with the allow unsafe flag and I get the error below: "error CS1577: Assembly generation failed -- Unexpected exception...
13
by: Nigel J. Andrews | last post by:
This will be a little vague, it was last night and I can't now do the test in that db (see below) so can't give the exact wording. I seem to remember a report a little while ago about tsearch v2...
0
by: Random | last post by:
I need help on knowing where to look for the source of this error. I have an assembly that I am using to make all the calls to my web service from my ASP.NET web application. Almost every time I...
19
by: roh | last post by:
Hi Folks, We have e-Biz application running on WebSphere Application Server Ver 6.0 using DB2 UDB Ver 8.1 . We are facing following issue in our application , any help from your side will be...
2
by: Nathan Sokalski | last post by:
I have a DataList in which the ItemTemplate contains two Button controls that use EventBubbling. When I click either of them I receive the following error: Server Error in '/' Application....
1
by: FightClubDiego | last post by:
Hey.. I've been working on these sign up / log in forms for my new Game Site, and everything else in the game works but the registration!! I keep ketting the unexpected $end and Im tired of it! Here...
8
by: illuzion | last post by:
ok I keep getting this error: Parse error: syntax error, unexpected T_VARIABLE in /home/illuzion/public_html/BAMF/contactus.php on line 38 and this error is possibly on other lines could...
3
by: graphicssl | last post by:
Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial! ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.