I have a document library SP 2013 and want to get all the documents from all folders and sub folders. I don't want any folders but I do want to get all the files from each folder. Using SP 2010 U2U CAML Builder, I have made below query: <pre lang="xml"> <query> <QueryOptions> <ViewAttributes Scope="Recursive" /> </QueryOptions> </query>
CAMLQuery = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>\ <soapenv:Body>\ <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>\ <listName>My Document Library</listName>\ <query>\ <QueryOptions>\ <ViewAttributes Scope="Recursive" />\ </QueryOptions> \ </query>\ </GetListItems>\ </soapenv:Body>\ </soapenv:Envelope>"; $.ajax({ url: "https://<server>/teams/<siteName>/_vti_bin/lists.asmx", type: "POST", dataType: "xml", data: CAMLQuery, complete: getGrid, contentType: "text/xml; charset=\"utf-8\"" });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)