How to read the xml file from 14 hive
-
I have a custom timer job by which I need to create custom properties using an xml file (which has all the custom properties). As for the xml file, I'm thinking to create a module for it. And then let the timer job read this XML file from the 14 hive Please anyone let me know how to read the xml file from the 14 hive Thanks,
-
Answer:
If you use Module, the file accessible by the URL. You should only activate feature that is installs this module to a web. After this you can use http://msdn.microsoft.com/en-us/library/ms476063.aspx method.
Rakie at SharePoint Visit the source
Other answers
Here is a simple code to retrieve an xml document from the hive: var path = SPUtility.GetGenericSetupPath("FileName.xml"); var text = GetContent(path); content = System.IO.File.ReadAllText(path); var doc = new XmlDocument(); doc.LoadXml(text);
Anatoly Mironov
Related Q & A:
- how delete node in xml file using php?Best solution by Stack Overflow
- How to Read xml file in java?Best solution by Stack Overflow
- How Add element to XML file?Best solution by Stack Overflow
- how to parse a xml file using jquery and phonegap?Best solution by Stack Overflow
- How to read a PDF file with PHP?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.