Breaking Into Google Base with RSS
“…we recommend tab-delimited plain text.” This is what Google presents to people interested in using Google Base bulk uploading.
There is a reason that Google would rather have us using tab-delimited files and that is because RSS is a difficult process. There are a few obstacles that need to be overcome when attempting to create a simple bulk upload file for Google Base that everyone should be aware of. There are actually vital errors or lack of information within the help documents that will prevent you from having a successful approved RSS bulk upload file.
By the time you finish reading this article you will be able to produce a functional bulk upload file using RSS 2.0 and will be able to bypass a days worth of headaches and hassles that our team went through for you. We will be looking at the following topics:
Namespace declarations
Using the & symbol
Correctly using user-defined attribute tags.
CaSe SeNsItIvE open / close tags REQURED.
Namespace Declarations
Google has numerous pre-defined attributes (Listed Attributes) but if your RSS file doesn’t have a proper namespace declaration, you’re going to find yourself with your first error.
In Google documentation the namespace declaration is displayed as followed:
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
This is fine until you run into the need to create user-defined attributes. For these attributes you need to add xmlns:c="http://base.google.com/cns/1.0 to your rss file.
Error #1
In order to add this new namespace declaration we need to use the following syntax:
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"xmlns:c="http://base.google.com/cns/1.0">
This didn’t work for our first round of tests. Google would return a ‘Failure’ every time. It wasn’t until we did the following that our RSS feed got past this problem:
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel xmlns:c="http://base.google.com/cns/1.0">
Our additional declaration worked fine when we put it in our <channel> tag and should work fine for your RSS bulk upload files as well. You will want to try this both ways to see what will work for you.
Using the & < > ‘ “ Symbols
<description>Peanut butter & Jelly is my favorite sandwich.</description>
The & symbol within a tag will give you a ‘Failure’ notice. & is reserved by XML therefore cannot be used. This becomes a problem with long URL’s and content that happen to have & in them.
We tried several methods to get this working correctly. The simple solution would be to convert every & sign to & or use <![CDATA[ … ]]> but these also did not work in the end either.
Instead, we had to create a php script to automatically build the RSS feed and use a preg_replace function to replace characters that could break the xml. This script also replaces all multi-byte characters with their numeric entities. We will get to this script towards the bottom of this article.
Correctly Using User-Defined Attribute Tags.
Because Google does not know any user-defined attribute tags, it is imperative that you let Google know what kind of data is being displayed within the tags.
You will notice in the documentation for Google Base that there are certain attributes where you can only put in Numbers, URL’s, Strings, Dates and so on. Google has already told itself how to process these but has no idea, until told, how to process your user-defined attributes. Be sure to keep the Google Custom Attributes Documentation book-marked and accessible for constant reference until you get more familiar with all that is available to you.
The proper syntax for a user-defined attribute is:
<[prefix]:[attribute_name] type="[content_type]">[value]</[prefix]:[attribute_name]>
Example: <c:Type_of_Cheese type=”string”>Pepper Jack</c:type_of_Cheese>
Notice that the closing tag does not need the content type in it. Simply the prefix and the attribute type will be fine.
CaSe SeNsItIvE open / close tags REQURED.
Not all RSS is case sensitive but when it comes to Google base you had better make sure you are watching to make sure your opening and closing tags are the exact same or you will get an error.
Getting Started With Your Own RSS 2.0 File
This article could not have been written without help from the people at Webmaster Radio (http://www.webmasterradio.fm). William Cross of http://www.seofox.com, Niels – Owner of http://www.tradefeeds.com, Adman – Owner of www.express-marketing.com/blog.html and David Ogletree - Owner of http://www.ogletreeseo.com
The Seo Fox will be hosting the script. You can produce a basic, WORKING RSS feed that you can then build onto as you see fit.
Written by John Jones, an active search engine optimization expert with The Seo Fox.
|