You need to use the "extensions" methods to set a non-standard
attribute. In this case, we're setting a "location" element that has
longitude and latitude children. You may have tried, as I did, setting
the location to include the actual xml tags for wrapping lat/lon and
found that the Zend framework helpfully escapes the less-than and
greater-than symbols. =)

Here you go:

$location = "The Park";
$latitude = 34.567;
$longitude = -123.456;
$composite = new Zend_Gdata_App_Extension_Element('g:location', 'g',
'http://base.google.com/ns/1.0', $location);
$latAttr   = new Zend_Gdata_App_Extension_Element('g:latitude', 'g',
'http://base.google.com/ns/1.0', $latitude);
$lonAttr   = new Zend_Gdata_App_Extension_Element('g:longitude', 'g',
'http://base.google.com/ns/1.0', $longitude);
$composite->setExtensionElements( array($latAttr,$lonAttr) );
$gbase_entry->setExtensionElements( array ($composite) );

Presumably, $gbase_entry is your, well, google base entry variable.

Cheers.

-Rob

--

You received this message because you are subscribed to the Google Groups 
"Google Base Data API" group.
To post to this group, send email to [email protected].
For more options, visit this group at 
http://groups.google.com/group/google-base-data-api?hl=en.


Reply via email to