SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I am using the lists.asmx webservice to POST a soap envelope and return specific list items. I really want the whole contents of the list. I realize how large that might get, but if this works the way I think it will, I'll be able to narrow that down.

Current code:

    var soapEnv =
            "<soapenv:Envelope xmlns:soapenv=''> \
                <soapenv:Body> \
                     <GetListItems xmlns=''> \
                        <listName>Produce</listName> \
                            <ViewFields> \
                               <FieldRef Name='Quantity' /> \
                               <FieldRef Name='Quantity2' /> \
                           </ViewFields> \
                    </GetListItems> \
                </soapenv:Body> \
            url: "",
            type: "POST",
            dataType: "xml",
            data: soapEnv,
            success: function(xData, status) { /*DO STUFF*/ }

Now I'm a bit of a greenhorn and I've just learned about the ListData.svc RESTful stuff that SharePoint 2010 will do. Let's say that I want to load the XML response from the ListData.svc service directly into a string. How do I do that?

Seems like that will be the better way to go!

share|improve this question
I would have rather used <subsite_URL>/_vti_bin/owssvr.dll?Cmd=Display&List={List_GUID}&XMLDATA=TRUE&nore‌​direct=true – Gennady Vanin Геннадий Ванин Sep 4 '12 at 15:55
Let's say I want to load the returned XML into a string; how do I do that? Perhaps it's easier than I think. Can I just say testXMLstring = <subsite_URL>/_vti_bin/owssvr.dll?Cmd=Display&List={List_GUID}&XMLDATA=TRUE&nore‌​‌direct=true? It didn't seem to work. – Shrout1 Sep 4 '12 at 16:59
You probably should ask this on javascript forum(s). Kind of crazy to do such things in Javascript in sharepoint environment having around Infopath, C#, ASPX, etc. – Gennady Vanin Геннадий Ванин Sep 6 '12 at 18:14
The goal is to read the data as XML and then parse it out into JSON data arrays for use in JQPlot charting libraries. I'm on a VERY restrictive SharePoint farm and I can only manipulate data from the client side. I'd ask this question on a JavaScript site but they would probably tell me to ask it on a SharePoint site. After all, it is using a SharePoint service. – Shrout1 Sep 6 '12 at 18:35
Don't tell abt sharepoint webservice, tell any of a public one, for example from Infopath is also on client side – Gennady Vanin Геннадий Ванин Sep 6 '12 at 19:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.