如何解析 FetchXML 请求的结果?
如何解析以下 FetchXML 请求的结果?
string fetch_checkEntity = @"
<fetch mapping='logical'>
<entity name='" + entityname + @"'>
<attribute name='" + columnname + @"' />
<attribute name='" + logicalnameid + @"' />
<order attribute='" + columnname + @"' />
<filter>
<condition attribute='statecode' operator='eq' value='0' />
<condition attribute='statuscode' operator='eq' value='1' />
</filter>
</entity>
</fetch>";
string result_checkEntity = crmService.Fetch(fetch_checkEntity);
How could I parse the result of the following FetchXML request?
string fetch_checkEntity = @"
<fetch mapping='logical'>
<entity name='" + entityname + @"'>
<attribute name='" + columnname + @"' />
<attribute name='" + logicalnameid + @"' />
<order attribute='" + columnname + @"' />
<filter>
<condition attribute='statecode' operator='eq' value='0' />
<condition attribute='statuscode' operator='eq' value='1' />
</filter>
</entity>
</fetch>";
string result_checkEntity = crmService.Fetch(fetch_checkEntity);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用
XDocument
功能来解析 fetch 语句的结果。我不知道
resultset
到底是什么样子,但这里有一些关于如何进行解析的提示。I recommend using
XDocument
features to parse the results of fetch statement.I don't know exactly how the
resultset
would look like but here are some hints on how to do the parsing.