Solved

Google Base XML file format

Posted on 2008-06-25
2
1,934 Views
Last Modified: 2013-12-08
I am trying to prepare a XML file for uploading to Google Base (www.google.com/base) , but am not having much luck. Below is a snippet of the code I have been using. The error message I get is "Data feed upload failed. No items are live."

I cant find an example of a full working XML file that I know works on Google base to follow. So am unsure what I am doing wrong. Perhaps I should be using some header and footer commands or code that I have omitted? Perhaps I need to place the attributes in a particular order?

Can anyone suggest what I might do?

Very many thanks

<item>
<g:price>24.20</g:price> <g:currency>GBP</g:currency>
<link>http://www.myurl.com/mypage.php?myid=mynumber</link>
<g:id>MYNUMBER</g:id>
<title>My Title Here</title>
<g:image_link>http://www.myurl.com/course_image_2.jpg</g:image_link>
<description>My Description Here</description>
<g:payment_accepted>Visa</g:payment_accepted> 
<g:payment_accepted> MasterCard</g:payment_accepted> 
<g:payment_accepted> Discover</g:payment_accepted> 
<g:payment_accepted> Discover</g:payment_accepted> 
<g:payment_accepted> AmericanExpress</g:payment_accepted> 
<g:payment_notes> PayPal accepted</g:payment_notes>
</item>

Open in new window

0
Comment
Question by:diarmuidod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
BobSiemens earned 500 total points
ID: 21870248
To find a working version, go to this page: http://base.google.com/support/bin/answer.py?answer=73932&hl=en
and do a 'Save As....' on one of their formats.


<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0">
 
	<title>The name of your data feed.</title>
	<link rel="self" href="http://www.example.com"/>
	<updated>2006-06-11T18:30:02Z</updated>
	<author>
		<name>The name of the author.</name>
	</author>
	<id>tag:example.com,2006-06-11:/support/products</id>
 
<entry>
<title>Red wool sweater</title>
<g:brand>Acme</g:brand>
<g:color>red</g:color>
<g:condition>new</g:condition>
<g:department>apparel</g:department>
<summary>Comfortable and soft, this sweater will keep you warm on those cold winter nights.</summary>
<g:expiration_date>2006-12-20</g:expiration_date>
<id>1</id>
<g:image_link>http://www.example.com/image1.jpg</g:image_link>
<link href="http://www.example.com/item1-info-page.html"/>
<g:made_in>US</g:made_in>
<g:material>wool</g:material>
<g:price>25</g:price>
<g:product_type>sweaters</g:product_type>
<g:size>large</g:size>
<g:style>casual</g:style>
</entry>
 
<entry> 
<title>Total Recall</title>
<g:actor>Arnold Schwarzenegger</g:actor>
<g:brand>Acme</g:brand>
<g:condition>used</g:condition>
<g:department>media</g:department>
<summary>Slightly used copy of Total Recall, the sci-fi classic, on DVD.</summary>
<g:director>Paul Verhoeven</g:director>
<g:expiration_date>2006-12-20</g:expiration_date>
<g:format>DVD</g:format>
<g:genre>Science Fiction</g:genre>
<id>2</id>
<g:image_link>http://www.example.com/image2.jpg</g:image_link>
<link href="http://www.example.com/item2-info-page.html"/>
<g:price>12</g:price>
<g:product_type>dvds</g:product_type>
<g:rating>R</g:rating>
<g:year>1990</g:year>
</entry>
 
<entry> 
<title>A Scanner Darkly</title>
<g:actor>Keanu Reeves</g:actor>
<g:brand>Acme</g:brand>
<g:condition>new</g:condition>
<g:department>media</g:department>
<summary>Exciting new movie featuring Keanu Reeves and directed by Richard Linklater.</summary>
<g:director>Richard Linklater</g:director>
<g:expiration_date>2006-12-20</g:expiration_date>
<g:format>DVD</g:format>
<g:genre>Drama</g:genre>
<id>3</id>
<g:image_link>http://www.example.com/image3.jpg</g:image_link>
<link href="http://www.example.com/item3-info-page.html"/>
<g:price>20</g:price>
<g:product_type>dvds</g:product_type>
<g:rating>R</g:rating>
<g:year>2006</g:year>
</entry>
 
<entry> 
<title>8" plush Care Bear</title>
<g:age_range>2-10</g:age_range>
<g:brand>Acme</g:brand>
<g:color>green</g:color>
<g:condition>new</g:condition>
<g:department>toys</g:department>
<summary>Small care bear, brand new, absolutely adorable!</summary>
<g:expiration_date>2006-12-20</g:expiration_date>
<id>4</id>
<g:image_link>http://www.example.com/image4.jpg</g:image_link>
<link href="http://www.example.com/item4-info-page.html"/>
<g:made_in>CN</g:made_in>
<g:price>6.99</g:price>
<g:product_type>stuffed animals</g:product_type>
</entry>
 
</feed>

Open in new window

0
 

Author Closing Comment

by:diarmuidod
ID: 31470702
Thank you. Great answer, got it working on the first attempt. Just changed  to  and played with the headings.

Thank you ever so much. I really do apreciate it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Soap Server returning XML but < & > as &lt; / &gt; 9 78
asp Google Map 2 57
How to control cache of some js files ? 7 53
Selenium and Xpath 4 29
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question