0

how to access xml resource file in C# wpf application?
i have made xml file a resource file but i cant access it .

here is a code:

private static string MessageExtract(string tagName) 

 {
   XmlDocument messageTags = new XmlDocument();
   messageTags.Load(@"//resources//Messages.xml");//this dont work 

   XmlElement messageRoot= (XmlElement)messageTags.GetElementsByTagName(tagName)[0];

   return  messageRoot.GetElementsByTagName(AppManager.GetCurrentLanguage())[0].InnerText;

  }

Edited by mike_2000_17: Fixed formatting

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by recawo
0

sorry about that..
but i use this "\\resources\\file.xml" ..
While posting i make a mistake ,actually using xml file as resource is my problem.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.