Another possibility I'm considering. Is there a limit to the size of
XMLReader? Maybe its getting full and chopping off part of the
document

On Nov 25, 3:48 pm, hanks2000 <[email protected]> wrote:
> No, I have matching tags. As I say, it works with a small amount of
> text in between the tags, as soon as the content is rather large (700
> chars +) I get the above exception.
>
> Its as if the reader is assuming that the tags arent closed because of
> the large string after the opening tag
>
> On Nov 25, 3:30 pm, Processor Devil <[email protected]> wrote:
>
>
>
> > Well, isn't the problem that you have some unmatched pair tags? According to
> > the exception it looks like some <xmltag> doesn't have a </xmltag> or you
> > are not using <standalongtag /> for non-pair tags :)
>
> > 2010/11/25 hanks2000 <[email protected]>
>
> > > Hi Guys
>
> > > I'm fetching data using an SQL stored procedure and returning XML
> > > using FOR XML EXPLICIT.
>
> > > In my code I'm then using ExecuteXMLReader on my sql command to pull
> > > the data into an XMLReader.
>
> > > When I try parsing the XMLReader, loading into an XMLDocument etc I
> > > get the following exception when the contents of some elements are
> > > rather long (approx 700 chars inc spaces)
>
> > > System.Xml.XmlException: Unexpected end of file has occurred. The
> > > following elements are not closed:
>
> > > If I reduce the contents of the XML elements drastically everthing
> > > works fine.
>
> > > Is there a known limit on Element contents when using XMLReader that
> > > makes it think the element tags havent been closed?
>
> > > Thank You In Advance
>
> > > Hanks
>
> > > p.s. If I read the results into a string using an SQLDataReader
> > > everything works fine- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Reply via email to