Error type...........: System.IndexOutOfRangeException:
Index was outside the bounds of the array.
at System.Xml.XmlTextReader.SetElementValues()
at System.Xml.XmlTextReader.ParseElement()
at System.Xml.XmlTextReader.Read()
at GetXMLFragment.CountXMLElements.getCounts()
Error description....: Index was outside the bounds of the
array.
Stack trace..........: at
System.Xml.XmlTextReader.SetElementValues()
at System.Xml.XmlTextReader.ParseElement()
at System.Xml.XmlTextReader.Read()
at GetXMLFragment.CountXMLElements.getCounts()
My code is as follows: (I've stripped it bare in an
attempt to isolate the problem)
XmlTextReader reader = null;
try
{
reader = new XmlTextReader(inputFileStream);
while (reader.Read())
{
totalReads++;
}
}
catch (Exception e)
{
reader.Close();
inputFileStream.Close();
//other exception stuff
}
It crashes on the 9477524 read. If I extract a subset of
the xml data (including the record it crashed on) and send
them through the code as a separate xml file I don't get
an exception.
Has anyone encountered this problem before? Is it a bug
within the XmlTextReader.
Any help would be greatly appreciated.
Thanks in advance.
Annmarie
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Annmarie" <azie...@fala.com> wrote in message
news:10f4801c25a6f$eea2c6b0$35ef2ecf@TKMSFTNGXA11...
I noticed the refereneces to Int, but I needed a 'sanity
check' to be sure that it was a XmlTextReader limitation
and not my code.
When you say future release, does that mean the release
that is scheduled for the end of this year or further in
the future?
Thanks again.
Annmarie
>.
>
Sorry. :(
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Annmarie" <azie...@fala.com> wrote in message
news:112d401c25a8e$87483f30$35ef2ecf@TKMSFTNGXA11...