3

The standard format of a CAML batch query is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<ows:Batch OnError="Continue">
  <Method ID="">
    <SetList>288a3dfc-ec52-45aa-a370-4ab01e3d0a05</SetList>
    <SetVar Cmd="Save" />
    <SetVar ID="New" />
    <SetVar Name="urn:schemas-microsoft-com:office:office#Foo">bar</SetVar>
  </Method>
</ows:Batch>

The problem with this is it isn't valid XML and thus can't be created with the System.Xml.Linq classes. The "ows" namespace is never declared before it is used.

Does anyone know if its possible/legal to actually declare the OWS namespace, and if so, to what? (Notice the ??? below)

<?xml version="1.0" encoding="UTF-8"?>
<ows:Batch OnError="Continue" xmlns:ows="???">
  <Method ID="">
    <SetList>288a3dfc-ec52-45aa-a370-4ab01e3d0a05</SetList>
    <SetVar Cmd="Save" />
    <SetVar ID="New" />
    <SetVar Name="urn:schemas-microsoft-com:office:office#Dog">5</SetVar>
  </Method>
</ows:Batch>
0

You don't need the ows namespace, Batch works just fine without it when I've called batch updates via web services.

1
  • From what I've read the web services CAML queries are different from the CAML you use for the SharePoint Object Model (which is what this is for).
    – MgSam
    Mar 19 '13 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.