If the XML file doesn't change frequently, and it's not a HUGE file, you
should cache it programmatically with the Cache property on Page, set a
dependency on the physical file (if it may change at all), and use an
XPathDocument if you need querying capabilities.
If you need OuterXml or InnerXml, or generally, an XmlReader interface to
the results of your queries, which will be XPathIterator and XPathNavigator
objects, you may want to take a look at the Mvp.Xml opensource project
(
http://sf.net/projects/mvp-xml). It contains quite a lot utility classes
for working with XML in a performant and convenient way. Here's a list of
what you can find in it:
http://weblogs.asp.net/cazzu/archive...15/132532.aspx
--
Daniel Cazzulino [MVP XML]
Clarius Consulting SA
http://weblogs.asp.net/cazzu http://aspnet2.com
"Timothy V" <tr****@msn.com> wrote in message
news:uH**************@TK2MSFTNGP11.phx.gbl...
Hi,
I'm developing an ASP.NET web app and i'm retrieving some data from xml
files.
My question is, if an xml file is going to be accessed a page is loaded,
should i:
1. use an in-memory XmlDocument (created each time the page is accessed);
or 2. use a forward-only XmlTextReader object (created each time the pages is
accessed).
Thanks very much in advance,
Tim.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 23/05/2004