摘要:
<?xml version="1.0" encoding="utf-8"?><users> <user> <id>003</id> <name>小张</name> <sex>female</sex> <age>30</age> <university>南大</university> <phone>13328981152</phone> </user> <use 阅读全文
摘要:
<?xml version="1.0" encoding="utf-8"?><users> <user> <id>003</id> <name>小张</name> <sex>female</sex> <age>30</age> <university>南大</university> <phone>13328981152</phone> </user> <use 阅读全文
摘要:
今天操作用linq操作XML时遇到带有冒号的节点一直获取不成功,如<a1:root xmlns:a1="http://ww.xxx.com/"> <a1:book>aaaa</a1:book></a1:root>正确的读取的方法是XDocument x = new XDocument(); x = XDocument.Load(@"f:\a.xml"); XNamespace n = @"http://www.xxx.com/"; var t = from a in x.Descenda 阅读全文
|