Slow reading xml file

I'm opening an xml file with the statement

XPathDocument xPathDocument = new XPathDocument(fileLocation);

and then scanning the structure using an XPathNavigator. This works but 
loading the document is tediously slow, since the xml file can be pretty 
large. What is a quick alternative ? 


0
5/16/2005 3:49:53 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
564 Views

Similar Articles

[PageSpeed] 9


JezB wrote:

> I'm opening an xml file with the statement
> 
> XPathDocument xPathDocument = new XPathDocument(fileLocation);
> 
> and then scanning the structure using an XPathNavigator. This works but 
> loading the document is tediously slow, since the xml file can be pretty 
> large. What is a quick alternative ? 

There is XmlTextReader which provides forward only pull parsing.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
5/16/2005 4:14:55 PM
Reply:

Similar Artilces:

Problem restoring Outlook 2003 PST file
I recently lost my pc in a power outage. Luckily, I was able to salvage the hard drive and copied the outlook.pst file to a CD. I am having trouble with Outlook recognizing my Contacts. Here is what I did: I opened up Outlook 2003 for the first time and receive the normal �welcome� email. I then go to File\Open\Outlook Data File and opened up the outlook.pst file. When I �click� on Contacts, I do see my address book, however a) if I try to add a new contact, it adds it to another contact list b) if I edit a contact, the custom categories that I created on my old pc, ...

Views not able to read resource.h
Hi, I've got a project (VC++ 6.0) with several views and dialogs. Tey were created with the dialog editor just as it should be, got an ID in resource.h (like IDD_DLGOBJEKTE), got a class attached to them; everything seemed fine. Now, after some months in coding, the views started not to be able to read resource.h as it seems. There is a line in every of the view-classes: "enum { IDD = IDD_ANYNAME };". The IDD_ANYNAME variable is corretly defined in resource.h. Nevertheless the compiler seems not to be able to resolve the constant's name to its value. When I manually do so (...

Chaning Print Settings in Password Protected File
While the data is very good, the 'publisher' didn't put much thought and/or effort into what it looks like in printed form ... Is there a way to modify 'page setup' parameters for an Excel file that is password protected? Good evening Cheryl B Only by unprotecting the worksheet, changing the print settings and then reprotecting the sheet again. if you don't have the password, look here for how to do it without the password: http://www.mcgimpsey.com/excel/removepwords.html If you're unfamiliar with VBA and putting this code into a module I have an add-in av...

Import XML data into SQL2000
Hi all, I am new to .NET but have a problem and see two possible directions i could go, but i do not know which one to take. Let me explain my problem, i have a webservice which recieves several large(ish) XML data streams. An example of the XML data: <asset name="test"> <inputDevice> <mouse> <caption>ps/2 compatible mouse</caption> <numberOfButtons>2</numberOfButtons> </mouse> </inputDevice> <drive> <CDROMDrive> <Drive>E:</Drive> <manufacturer>Sony</ma...

Build is slow.
Hello. The environment is 6.0 vc++. When one DLL has 1700 source codes. Build is slow. debug start takes time. Please teach a good solution. Thanks, Buy a faster computer. ;) AliR. "teratera" <teratera@discussions.microsoft.com> wrote in message news:23DF80A8-723F-43A3-A5D9-7722EEA97578@microsoft.com... > Hello. > > The environment is 6.0 vc++. > When one DLL has 1700 source codes. > > Build is slow. > debug start takes time. > Please teach a good solution. > > Thanks, > "teratera" <teratera@discussions.microsoft.com>...

Slow Navigating Folders for attachments!!
Using Outlook-2002. Recently, since about a month ago, when I try to save attachments or attach files to messages and attempt to navigate to the folder of interest (after I click on the attach button), navigation is VERY slow - like if I click on a sub-folder, it may take over a minute for that sub-folder to open. It doesn't matter if other apps are running, or if I'm just changing to a different drive, or to the root directory. Everything takes minutes! It renders it useless :-( Any ideas? ...

file size problem
When I save a file containing 69kb of content and hover the mouse over the file icon it says the file size is 69 mb and then refuses to re-open. Is this a fault in the software? I've never seen excel or windows report back 69Meg when the file was 69k. Are you sure your workbook isn't 69M? And to help others with your followup: What version of windows and what version of excel are you using? doug wrote: > > When I save a file containing 69kb of content and hover the mouse over the file icon it says the file size is 69 mb and then refuses to re-open. Is this a fault in ...

Why can't my new PC (w/MSWorks) open my Excel files?
Why can't my new PC (which has MS Works-spreadsheet) open my Excel files? Hi Kris, MS Works is not Excel. You will need to purchase Excel or MS Office unless you merely need to read the spreadsheet, in which case you can download a free MS viewer from: http://office.microsoft.com/downloads/2000/xlviewer.aspx --- Regards, Norman "KrisKelly" <KrisKelly@discussions.microsoft.com> wrote in message news:1D5A6DD6-1683-4CA7-945D-EB4D385A74BB@microsoft.com... > Why can't my new PC (which has MS Works-spreadsheet) open my Excel files? "Norman Jone...

Log Files Ex 2003
I have a large number of log files being generated in the mdbdata directory on my exchange server 2003 ie E0000239.log. It is running my server out of disk space. I assumed these where due to circular logging but am not sure. How do I stop these from building up and can I safely remove them (They are all backed up). thanks for the support. This is normal when circular logging is turned off, which is recommended. The correct way to remove these log files is to perform an Exchange full backup using an Exchange-aware backup application (like Windows Backup on the actual Exchange server its...

Turning off read receipts once turned on
In Outlook 2000 (configured for CW), the first time an e- mail is opened with a read receipt request, you have a pop-up option to sned a receipt everytime you get a read receipt request. If this is turned on, how can you turn it back off? Going into the Tools>Options>E-mail Options>Tracking Options does not allow you to change your preference once you have accepted read receipts. Neither does reinstalling office. Any suggestions? ...

benefits of xml schemas in .net
Hi, I have been asked to write xml schema files for some xml local datastores that we will be using. Being new to .net, I do not know if this will be of any benefit to our development efforts. So I am curious. Does an xml schema assist in .net development in anyway? Does it make the xml parsing faster or something? I don't quite understand the point of the schemea if you properly write the xml file out. Thanks for reading and participating. Paul wrote: > I have been asked to write xml schema files for some xml local datastores > that we will be using. Being new to .net...

Slow Slow Slow
When I click between different emails in my inbox, it takes ages for it to appear on the display. My internet connection is super fast. I have recently had to reinstall Office XP and I think a setting has been changed somewhere. I have an anti-virus but it never slowed it down like this before. To put in perspective, I've had 120 spams today and its took 37 minutes to delete them because of this problem. I have ran a virus check and its fine. Any thoughts on a registry tweak?? Cheers Carl Carl Sheldon <ccshell@courtlands5.freeserve.co.uk> wrote: > When I click between differe...

Archiving doesn't reduce PST file size
(Under W98SE, running O2K SR-1 with SP3 applied.) I really want to reduce the size of my PST file. In Outlook, I created a new personal folders file and named it "My Archive". From my main personal folders file, I then selected certain folders and messages - altogether, 57 MB - which I want to archive. I moved these into the "My Archive" folders file. In Outlook, looking at properties, I see these results after archiving: Main PST file: Total size (Fld + SubFld): 150489K "My Archive" file: Total size (Fld + SubFld): 56397K In Windows explorer, I s...

Word 2003
It takes sometimes 10 seconds when I press crtl+c (copy) or crtl+x (cut) in a text inside Word 2003. Even if it is only one word it takes a lot of time just to copy or cut or paste it. That does not happen in Excel or Power Point only in Word. Please can anybody help me to solve this very annoying issue? Thank you very much indeed, Anderson From reading other postings on this forum, it seems that poor AddIns can cause this latency. I have also found that doing a clean up of the temp files seems to help as well. Hope this helps DeanH "Anderson" wrote: ...

contactcoll.cache
Hi there, windows xp SP3 I have dumped/trasfered to whole of the C: drive onto my USB external hard drive for safe keeping It is connected to another xp sp3 PC....I have a file on there that is contactcoll.cache - CACHE File, this is my email contacts. Is it possible to open them on the external hard drive. Steve "moonraker" wrote: > Hi there, windows xp SP3 I have dumped/trasfered to whole of the C: drive > onto my USB external hard drive for safe keeping It is connected to another > xp sp3 PC....I have a file on there that is contactcoll.cac...

How can I read OST file
I have a good friend who was let go from her company. She has her OST file from her job and wants to get her info out of it. When I try and use it I get a message that it was configured for a different mailbox. Any way around this? Check here: http://officerecovery.com/exchange/?204800 -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP http://home.hawaii.rr.com/schorr **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! "Geoff Rhodes" <anonymous@discussions.microsoft.com> wrote in me...

slow loading, slow updating
I am using MS Money in a non-standard application. I am maintaining ledgersin checkbook fashion for 100 accounts, each set up as a separate checking account. Each of those has 3 transactions set up as automatic bill pays. Other than that, there are very few entries, averaging 6 per year at most. The program takes about 5 minutes to load. Corrections, such as posting bill payments, takes approx 10 seconds to cycle through: Open, edit, enter, wait........ Open, edit, enter, wait.....etc. I am not doing any online updating or anything like that. Is there anything I can do to speed this ...

Another Fetch XML issue
Hi Guys It seems that I cant use objectid in the activity entity to create a join using fetchxml this works ok ============= select SUB.FirstName, SUB.LastName, AB.[Name], ATB.Subject, ATB.[Description], ATB.ActualEnd, ATB.ScheduledStart FROM dbo.AccountBase AB Inner Join SystemUserBase SUB On SUB.SystemUserID = AB.OwningUser INNER JOIN ActivityBase ATB On ATB.ObjectID = AB.AccountID This complains that objectid is invalid ======================================= Has anyone else had this problem? cheers <fetch mapping='logical'> <entity name='account&...

READ / DELIVERY RECIEPTS
What is the difference in "Read" & "Delivery" reciepts? Chad <anonymous@discussions.microsoft.com> wrote: > What is the difference in "Read" & "Delivery" reciepts? Asked and answered already. No need to ask more than once. -- Brian Tillman ...

Copying files from the DMZ to Internal Domain
Hello, I am trying to write a script that saves a password as a secure string in a text file and calls the text file to pass the credentials to copy files. So far I ran the following command Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File C: \PowerShell\MyPassword.txt However, from my readings, it seems like powershell does not let you pass credentials into the copy-item command. So I figured the only way to do this would be to pass variables into the net use command for both paths. So I created two text files with two encrypted passwords and wrote the following...

Slow Viewing e-mails
Suddenly it's very slow to view e-mails in Outlook 2002. Any kind of e-mail, with or without attachments. It worked fine until a few days ago. Anyone have any ideas? Found an answer to the problem in another post. Simply turning of the Messenger Integration fixed everything. /Johan >-----Original Message----- >Suddenly it's very slow to view e-mails in Outlook 2002. >Any kind of e-mail, with or without attachments. It >worked fine until a few days ago. Anyone have any ideas? >. > On 25 nov 2003 Johan wrote: > Found an answer to the problem in another pos...

Save As a "Read-Only" Doc to Regular doc
Hi Everyone, What I essentially need to do is to create a "Master" form that everyone can use but won't be able to save on top of Master. so that's why I'm making the form as "Read-Only" however I notice that if another user just Save As the file to another name the "Read-Only" option still stay with the new doc, and if I put "Password to Modify" that password still also stay with the new document the user save as. Is there a way to do this so that neither the "Read-Only" nor the "Password to Modify" will ...

why GetFieldValue() is so slow
I get connected a vfp6 dbf file, and the total record number is about 50000, I want to export specified field value ( most of their type are string), and the result is correct, but it works toooooo slow, and I find the function GetFieldValue takes most time. my code is: while(!m_Rs.IsEOF()) { for(index=0; index < m_ListDest.GetCount(); index++) { strLine=m_pSortItem[m_pSortList[index]]; m_Rs.GetFieldValue(m_pSortList[index], strVal); strVal.TrimRight(_T(' ')); if(strVal == "" && m_isFilter) continue; strLine.Insert(0, _T('[')); ...

PST file disappears
Greetings, I am running Outlook 2000. The system checks out clean. No Virus, no disk problems, etc. The outlook.pst file just flat disappeared. Is this a known problem ? How do I get it back ? thanks, Darryl Have you done a search on your hard drive or your network drives to see if it is out there but in a different location than you are expecting? If it was on a network drive, can your admins restore it from backups? "Darryl" <darryl@osborne-ind.com> wrote in message news:O7$Lr$h#DHA.2212@TK2MSFTNGP10.phx.gbl... > Greetings, > I am running Outlook 2000. The sy...

Outlook 2003 Pro with XP Pro Too Slow with McAfee 2004
I just bought a new high-end brandname laptop with XP Pro. In it, I: - installed Office 2003 Pro, - installed McAfee Internet Security Center 6.0 2004 (including Firewall, AntiVirus, Privacy Service, Spamkiller), and - downloaded and installed all latest MS and McAfee software updates, by the books. Hoping to lessen intra-computer response, I opted out some sub-features in McAfee. The installations were easy. Without McAfee, Outlook 2003 was fast, reliable. After installing and working with McAfee, Outlook 2003 is miserably slow in most operations (send/receive, clicking on ema...