0
の属性の値を取得したい:私はこれはXMLファイルであるXMLファイルから
<?xml version="1.0" encoding="utf-8" ?>
<Books>
<Book id="1">
<Author>Mark</Author>
<Publisher>Sams</Publisher>
</Book>
</Books>
これは、属性を抽出するためのコードです:
XmlTextReader textReader = new XmlTextReader("D:\\books.xml");
textReader.MoveToElement();
string au = textReader.GetAttribute("Auther");
Uname.Text = au;
申し訳ありませんが、何ですか? – StampedeXV
より正確には:あなたは何をしたいのですか、何がうまくいかないのですか? – StampedeXV
それはタイプミスですか?著者と著者? – ScottE