473,405 Members | 2,354 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,405 software developers and data experts.

XmlTextReader and 2GB file limit

Are there any work arounds to get XmlTextReader to work with files bigger
than 2GB? I tried to get the source of XmlTextReader and create a version
with long (instead of int) offsets but I can't compile it due to package
restrictions.

Best wishes,
Hugh McFadden

hu***********@visiongain.com
Nov 11 '05 #1
3 2873
Hugh McFadden wrote:
Are there any work arounds to get XmlTextReader to work with files bigger
than 2GB? I tried to get the source of XmlTextReader and create a version
with long (instead of int) offsets but I can't compile it due to package
restrictions.

Sorry for lame question, I've never tried to process so enourmous documents,
but what's the problem exactly is? Do you get any exception or something?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2
Hugh McFadden wrote:
Yes, you're right, I get this exception:
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()

Hmmm, it's too few info. In Rotor sources I don't see nothing in
SetElementValues method which could cause IndexOutOfRangeException, probably
it happens deeper in XmlScanner.
It's tempting to debug it under Rotor, but the file is so huge I cannot
download it at work, only at home in the evening.
Which .NET version are you using?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #3
I am using v1.1 of the framework on Win2k3.

I think it is this particular line:
int offset = _Scanner.StartPos;

When the file is bigger than 2GB then that line will assign -1 to offset
(atleast I think, without being able to debug it I can't be sure)

Best Wishes

"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:OQ****************@tk2msftngp13.phx.gbl...
Hugh McFadden wrote:
Yes, you're right, I get this exception:
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() Hmmm, it's too few info. In Rotor sources I don't see nothing in
SetElementValues method which could cause IndexOutOfRangeException,

probably it happens deeper in XmlScanner.
It's tempting to debug it under Rotor, but the file is so huge I cannot
download it at work, only at home in the evening.
Which .NET version are you using?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #4

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

Similar topics

4
by: Andy Neilson | last post by:
I've run across a strange behaviour with XmlSerializer that I'm unable to explain. I came across this while trying to use XmlSerializer to deserialize from a the details of a SoapException. This...
5
by: Geoff Bennett | last post by:
While parsing an XML document, my TextReader instance skips nodes. For example, in this fragment: <Person Sex="Male" FirstHomeBuyer="No" YearsInCurrentProfession="14"> <RelatedEntityRef...
3
by: prasad | last post by:
Hi, I am using XMLTextReader class to read the xml files. In some cases xml declaration tag might start after space/tab charecters. These kind of files are supported by the browsers and xml dom's...
1
by: SHC | last post by:
Hi all, I did the "Build" on the attached code in my VC++ .NET 2003 - Windows XP Pro PC. On the c:\ screen, I got the following: Microsoft Development Environment An unhandled exception of type...
2
by: XML reading with XMLTextReader | last post by:
im trying to read an xml file which is in the wwwroot folder.im using IIS on XP Prof. my code is...
4
by: Paul Bromley | last post by:
I thought that XMLTextReader would be simple to use, but I have run into problems with it! I seem to have great difficulty extrcting the text of specific elements from a very simple XML file. I...
2
by: =?Utf-8?B?TWlzY2hh?= | last post by:
It is my understanding that I can create an XmlTextReader from a variety of sources, including a stream object. I am developing a web application that reads some data from an Xml file. Everything...
2
by: syvman | last post by:
Hi... I am working on a simple program (in VB.net) that will grab the values of elements out of an XML file that are tagged as "databasePath"... My program works, but I am getting too many...
2
by: bbindae | last post by:
I am trying to check whether XmlTextReader reads the xml file successfully or not. MSDN says that XmlTextReader raise the FileNotFoundException when it cannot find the file to read. Here is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.