0
私はXML属性を変更し、ファイルが電話パスのAppディレクトリに保存されているXMLファイルを "Android/data /データ/ App17.App17 /ファイルは、」今、私はこのどのように私のプロジェクトのソリューションで更新されたXMLファイルを私の電話からのアプリケーションディレクトリからロードすることができます
namespace App17
{
[Activity(Label = "App17", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
var xml = XDocument.Load(Assets.Open("Q317664.xml"));
var node = xml.Descendants("Book").FirstOrDefault(cd => cd.Attribute("Id").Value == "1");
node.SetAttributeValue("ISBN", "new");
string dir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
string path = Path.Combine(dir, "Q317664.xml");
}
}
}