Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在隔离存储中有 xml 文件。附上快照。我有两个问题
请给我这两个问题的代码。
您可以XDocument用来解析 XML 文件:
XDocument
XDocument doc = XDocument.Load("PATH/TO/YOUR/INPUT"); var v = doc.Descendants("imageTime").ToArray();
然后到,
1- 读取第一个imageTime元素:
string value = v[0].Value;
2-修改第三个imageTime元素:
v[2].Value = "yourNewValue";
不明白为什么这不起作用。我有一个简单的'input type="date"'字段......
<input type="date" name="Date"/>
每当使用此功能加载页面时,我都会尝试将值设置为今天的日期...
function setDate