Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: open

Format of snippet in Google API output?

   
5:14 pm on Sep 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When I run a simple program (perl) to search for
google
I get the following in the title and snippet fields:

Title:

<b>Google</b>

snippet:

 <b>...</b> Advertise with Us - Business Solutions - Services & Tools - Jobs,<br> Press, & Help Ac2003 <b>Google</b> - Searching 3,307,998,701 web pages.

The snippet is all on one line with no line breaks.

Now I have no problem adding a function that will change the various

>
etc to
>
etc., but is this the expected output format?

The APIs_Reference.html file says nothing about having to convert entities to "normal" characters, and more to the point none of the examples in Google Hacks shows such a conversion.

I am running WinXP with a Cygwin environment, using the perl that comes with it:

This is perl, v5.8.0 built for cygwin-multi-64int
. I installed SOAP::Lite and its many prerequisites using
perl -MCPAN -e 'install SOAP::Lite'
which did not complain.

The obvious place to ask is the google.public.web-apis newsgroup, but it seems to be a "questions without answers" newsgroup :(

Any help would be much apprciated.

4:27 pm on Sep 14, 2003 (gmt 0)

10+ Year Member



What's your code look like? I'm wondering how you're getting this result.
4:34 pm on Sep 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the reply is suposed to be XML then all entities MUST be encoded to validate and comply to the XML standard.

SN

4:46 pm on Sep 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I understand, but from the examples in the Google Hacks book I assumed that the strings were being decoded before being returned to the calling program. So I am asking what others have observed.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month