I've tried escaping the ampersand using <![CDATA[]], html encoded characters but it doesn't return any results.

My query looks like

CAMLQueryOptions : "<QueryOptions><Folder>DocLibrary & Example/AFolder</Folder></QueryOptions>"

To get items in the AFolder folder, It works with all other document libraries that don't have an ampersand and it works

How do I escape it?

  • Try the Query using CAML Query Builder and make sure the query returns data. Commented Mar 18, 2015 at 15:03

2 Answers 2


I've got two solutions for you:

  1. Replace the & with &amp;
  2. Use CDATA: <![CDATA[DocLibrary & Example/AFolder]]>

Apparently Its not an Issue with the ampersand. But with a sharepoint list naming. I changed the name list so even though in spservices i can change the list name via

listName: New list Name

I have to use the original list name in caml queryoptions like

CAMLQueryOptions : "Original List Name/AFolder"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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