SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


share|improve this question
what you mean by module? – Amit Kumawat Dec 1 '11 at 16:57

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 SPWeb.GetFile method.

share|improve this answer

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();
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.