I've done

Additional info:

I'm using the Zend GData PHP library, the script is .../Zend/Gdata/
App.php

The error message is: Premature end of data in tag feed line 1 Entity,
line: 3.............
The error sentence is always parsing the XML document (loadXML method
of DOMDocumnet PHP class)

public static function importString($string,
$className='Zend_Gdata_App_Feed')
{
 // Load the feed as an XML DOMDocument object
 @ini_set('track_errors', 1);

 $doc = new DOMDocument('1.0', 'UTF-8');
 $success = @$doc->loadXML($string);
 @ini_restore('track_errors');
 if (!$success) {
  require_once 'Zend/Gdata/App/Exception.php';
  throw new Zend_Gdata_App_Exception("DOMDocument cannot parse XML:
$php_errormsg");
 }
 $feed = new $className($string);
 $feed->setHttpClient(self::getstaticHttpClient());
 return $feed;
}

I attach a file with the content of the $string variable. I modified
the file, separating the XML tags, to be human readable

The XML string is suddenly truncated. Why?
In my perspective, because there are one latin char, "í" . You could
find lluís in one item. I also attach the GMail Contacts screen to
better view

If all my contacts haven't any latin char, all is OK
I'm not capable to find where is the problem.....

Regards, Lluís

On 3 jul, 10:35, "Alex (Google)" <[EMAIL PROTECTED]> wrote:
> Hi Lluis,
>
> Can you also cross post this to the Google Contacts API group?
>
> http://groups.google.com/group/google-contacts-api
>
> -alex
>
> On Jun 30, 9:36 am, Lluis <[EMAIL PROTECTED]> wrote:
>
> > We're involved in a development, trying to sync contacts from our
> > internal database to GMail contacts
> > We're coding in PHP, and we're using  Zend GData Framework 1.5.2
>
> > As in ZF there isn't API's to connect to Google Contacts, our first
> > step was to code similar ZF classes.
> > We use Calendar classes as template, to develop the new ones
>
> > Now we finished and all is running. We could query, insert and update
> > GMail contacts without major problems
>
> > But, the above isn't really true. It only runs if there aren't Latin
> > chars (ñ, vowels with accent,...)
>
> > With Latin chars we have strange behaviours; for example when we try
> > to query more than one contact
> > GET /m8/feeds/contacts/default/full?start-index=1&max-
> > results=2&orderby=lastmodified&sortorder=descending
>
> > Sometimes we got a time-out, sometimes we got a fatal error:
> > Uncaught exception 'Zend_Gdata_App_Exception' with message
> > 'DOMDocument cannot parse XML:
> > Premature end of data in tag feed line 1 in Entity, line: 5' in C:
> > \xampp-data\php-includes\Zend\Gdata\App.php:319
>
> > We have the same behaviour in Windows box (PHP Version 5.1.4) and
> > Debian Linux box (PHP Version 5.2.4)
> > Our internal database is mySQL with utf-8 encoding
>
> > Now we're looking for the issue
> > 1- Google Contacts API ?
> > 2- Zend GData Framework ?
> > 3- Our developed Contact classes are ok ?
>
> > Someone has had the same issue ? Any direction would be appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to