Hi Allan,
As other members have suggested,you can use the XmlDocument class to load
the XML configurure file. Or if you want a strong-type accessing to the
content of the XML document, you can consider using XML Serialization to
map your XML document to .NET custom classes:
#Introducing XML Serialization
http://msdn2.microsoft.com/en-us/library/182eeyhh(vs.71).aspx
Also, if the content of the XML configuration file will be used within the
entire lifecycle of your ASP.NET webservice, you can also cache it in
ASP.NET runtime Cache collection so as to avoid frequent file I/O
operations. Another benifit of using Cache is that ASP.NET cache has a
"FileDependency" which can help you cache objects depend on a disk file.
Whenever the specified file has been changed, the cached object will be
invalidate and removed from cache. This can help you update the cached
configuration with better performance:
#Cache Management in ASP.NET
http://www.codeproject.com/aspnet/cachemanagementinaspnet.asp
Hope this also helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.