Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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>

Thanks.

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

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

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