To work on an XML file, download the XML specification from Advanced tab of the Control Panel. Don't start a file from scratch - developers.google.com ![]()
Do the following:
# 1) Download the context file Download the context xml file, or annotations xml file from the Advanced tab of the Control Panel. Click the Download button in the appropriate section. You can choose to download the files to your hard drive or view them in another browser window or tab window.
# 2) Save the XML file
Use your browser to save the XML file, or copy the XML text from the webpage and paste it to your favourite text editor.
Use a text editor that can handle UNIX-style line endings (WordPad, Emacs, and TextMate works; NotePad doesn't). It does not matter what you name the file, so long as you save it with the file extension .xml (for example, cx_global.xml)
# 3) Make a backup
Make a backup copy of the downloaded file in case your edited version does not work as expected, and you have to revert to the previous version.
If you do not make a copy and the version that you edited does not work properly, you will need to debug your file or recreate your search engine all over again. Not fun.
# 4) Edit the XML file and save it
Make sure that your text editor is saving the file as a Unicode text document and not some other file format.
# 5) Upload the file
Upload the file under the correct section in the Advanced tab.
# See also - Custom Search API