xamarin 安卓里面如何获取 Resources文件下 values string.xml路径
if (dataset!=null)
{
bl = true;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("@sttrings.xml");//路径如何写
XmlNodeList xnlist = xmlDoc.GetElementsByTagName("data");//这个data是固定
foreach (XmlNode node in xnlist)
{
if (node.Attributes != null)
{
if (node.Attributes["xml:space"].Value == "preserve")//这个preserve也是固定的
{
if (node.Attributes["name"].Value == "设置_用户名")//String1是你想要编辑的
{
node.InnerText = "我成功了";//给他赋值就OK了
}
}
}
}
xmlDoc.Save("@sttrings.xml");
}