以下查询中缺少什么?它从文档库中获取所有记录?
//Specify the Caml Query
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "<View Scope='Recursive'><Where><Contains><FieldRef Name='File_x0020_Type' /><Value Type='text'>msg</Value></Contains></Where></View>";
ListItemCollection listItems = sharedDocumentsList.GetItems(camlQuery);
由于
答案 0 :(得分:2)
Query
节点内应该有一个View
节点,Where
内部应该有Query
个节点:
camlQuery.ViewXml =
@"<View Scope='Recursive'>
<Query>
<Where>
<Contains>
<FieldRef Name='File_x0020_Type'/>
<Value Type='text'>msg</Value>
</Contains>
</Where>
</Query>
</View>";