CAML 查询:如何从结果集中过滤文件夹? [英] CAML queries: how to filter folders from result set?

查看:23
本文介绍了CAML 查询:如何从结果集中过滤文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 caml 查询来选择用户修改或添加的所有文档.查询在指定网站集的所有子网站上递归运行.

I'm using caml query to select all documents which were modified or added by user. Query runs recursively on all subsites of specified site collection.

现在的问题是我无法摆脱也是结果集一部分的文件夹.现在我从结果数据表中过滤它们.但我想知道:是否可以仅使用 caml 从结果集中过滤掉文件夹?

Now problem is I can't get rid of folders which are also part of result set. For now I'm filtering them from result datatable. But I'm wondering: Is it possible to filter out folders from result set just by using caml?

推荐答案

这个 CAML 实际上做到了:

This CAML actually does the trick:

<Where>
    <Eq>
        <FieldRef Name='FSObjType' />
        <Value Type='Integer'>0</Value>
    </Eq>
</Where>

那不会给你任何文件夹.

that will not give you any folders.

这篇关于CAML 查询:如何从结果集中过滤文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆