请问MOSS 2007 中的Lists.asmx如何取列表下子目录里的目录与文档?

hbynasan 2010-12-11 05:48:11
DemoList.Lists abbList = new SecurityManagementSystem.qjyckmList.Lists();

System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("UserName", "PassWord");
abbList.Credentials = credentials;

string listName = "MyLists";
string rowLimit = "150";

System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();

System.Xml.XmlElement query = xmlDoc.CreateElement("Query");
System.Xml.XmlElement viewFields = xmlDoc.CreateElement("ViewFields");
System.Xml.XmlElement queryOptions = xmlDoc.CreateElement("QueryOptions");

query.InnerXml = "<Where><Gt><FieldRef Name=\"ID\" />" + "<Value Type=\"Counter\">3</Value></Gt></Where>";
viewFields.InnerXml = "<FieldRef Name=\"Title\" />";
queryOptions.InnerXml = "";


System.Xml.XmlNode nodeListItems = abbList.GetListItems(listName, null, query, viewFields, rowLimit, queryOptions, null);

DemoList为引用的MOSS 2007中的 list.asmx WebService服务。

请问在MyLists下面会有子目录,有办法取到子目录下的文档与目录列表吗?如果可以如何取?谢谢!
...全文
71 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hbynasan 2010-12-12
  • 打赏
  • 举报
回复
queryOptions.InnerXml = "<QueryOptions><Folder>上级目录\\子目录\\子目录</Folder></QueryOptions>";

是的,这样就可以了,谢谢!
Justin-Liu 2010-12-11
  • 打赏
  • 举报
回复
参数传入文件夹路径

3,242

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 SharePoint
社区管理员
  • SharePoint社区
  • 霖雨
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧