私はXMLを持っています(これはまさにそれがどのように見えるかです):
<PolicyChangeSet schemaVersion="2.1" username="" description="">
<Attachment name="" contentType="">
<Description/>
<Location></Location>
</Attachment>
</PolicyChangeSet>
これはユーザーのマシンにあります。
各ノードに、ユーザー名、説明、添付ファイル名、コンテンツ タイプ、および場所の値を追加する必要があります。
これは私がこれまでに持っているものです:
string newValue = string.Empty;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(filePath);
XmlNode node = xmlDoc.SelectSingleNode("/PolicyChangeSet");
node.Attributes["username"].Value = AppVars.Username;
node.Attributes["description"].Value = "Adding new .tiff image.";
node.Attributes["name"].Value = "POLICY";
node.Attributes["contentType"].Value = "content Typeeee";
//node.Attributes["location"].InnerText = "zzz";
xmlDoc.Save(filePath);
何か助けはありますか?