我想用 C# 从 XMLNodeList 对象中的 XmlDocument 对象中选择所有用户节点m:properties!这该怎么做?这是我的 C# 代码,其中获取 xml 文档:XmlDocument navEmployesXML = GetXmlDataFromUrl("MYURL");XmlNodeList nodelist = navEmployesXML.SelectNodes("/feed/entry"); I try with full path but doesnt working这是我的 xml 文档格式:<?xml version="1.0" encoding="UTF-8"?>-<feed xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns="http://www.w3.org/2005/Atom" xml:base="http://10.20.1.8:7018/activity/OData/"> <id>http://12333:7018/activity/OData/EmList</id> <title type="text">EmList</title> <updated>2018-07-13T14:40:29Z</updated> <link title="EmList" href="EmList" rel="self"/>- <entry m:etag="W/"'36%3BUBQAAAJ7%2FxAEEgQVBBcEFQQSBBAEAAAAAA%3D%3D7%3B33898870%3B'""> <id>http://12333:7018/activity/OData/EmList('%D0%90%D0%92%D0%95%D0%97%D0%95%D0%92%D0%90')</id> <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="NAV.EmList"/> <link title="EmList" href="EmList('%D0%90%D0%92%D0%95%D0%97%D0%95%D0%92%D0%90')" rel="edit"/> <title/> <updated>2018-07-13T14:40:29Z</updated>- <author> <name/> </author>- <content type="application/xml">- <m:properties> <d:No>avezeva</d:No> <d:Company>My Company</d:Company> <d:FullName>Angelina Dangeloa</d:FullName> <d:USERID_1>myDomain\AVEZEVA</d:USERID_1> <d:Job_Title>Organisator</d:Job_Title> <d:Department>MY SOFT</d:Department> <d:ManagerID>myDomain\AIVANOV</d:ManagerID> <d:Days_of_current_year m:type="Edm.Int32">20</d:Days_of_current_year> </m:properties> </content> </entry>-我想要所有节点 →条目- 包含所有用户信息
1 回答
- 1 回答
- 0 关注
- 130 浏览
添加回答
举报
0/150
提交
取消