[PHP-DB] Processing google calendar feed (prefixed namespace issue)
Hello PHP people. I'm trying to use simplexml to gather info from a google calendar feed, and I've run into a problem where the google xml has a namespace prefixed to some fields, and I don't know how to deal with this colon. For instance: $xml_data = simplexml_load_file($xml); foreach ($xml_data-entry as $item) { print p; print $item-title; print br /; print $item-gd:when; print /p; } Printing the $item-title works fine, but it chokes on the colon for the tag gd:when. Any ideas how I can extract data from an xml line that looks like this: gd:when startTime='2007-07-29T12:00:00.000-04:00' endTime='2007-07-29T20:00:00.000-04:00'/gd:when Thanks, A. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Problem with rss-feed generation
Hi, I've a problem in creating a xml-file for a dynamic rss-feed. When I try to read the feed in my feedreader RSSowl I get an errormessage that the xml was not formated properly The feed should present boardentries in a short description. Because there are much articles the feed should show that as seperate postings like other feeds do it also. Together with the xml-file I think that someone can give me support how to fix the problem so I can try to read the feed in RSSowl for testing. Regards, Ruprecht --- Ruprecht Helms IT-Service Softwaredevelopment allow your worktools be individual Web: http://www.rheyn.de rss-feed-test3.php Description: application/php xml version=1.0 encoding=ISO-8859-1 !DOCTYPE rss PUBLIC -//Netscape Communications//DTD RSS 0.91//EN http://my.netscape.com/publish/formats/rss-0.91.dtd; rss version=0.91 channel title(RSS 2.0)/title linkhttp://www.xing.com//link descriptionDie neuesten Artikel in Bla-Bereich ; /description languagede/language managingEditorRuprecht Helms [EMAIL PROTECTED]/managingEditor webMasterRuprecht Helms [EMAIL PROTECTED]/webMaster item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; dsklfdsafdsajfasdf lt;brgt;/description descriptiondsklfdsafdsajfasdflt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; Test lt;brgt;/description descriptionTestlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; Testantwort lt;brgt;/description descriptionTestantwortlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; xx lt;brgt;/description descriptionxxlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]Test erneuter Testlt;brgt;/description description]Test erneuter Test lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]Test erneuter 2. Test lt;brgt;/description description]Test erneuter 2. Test lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]Test erneuter 2. Test lt;brgt;/description description]Test erneuter 2. Test lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; dfklödsfadfsjdkjsdafasdj lt;brgt;/description descriptiondfklödsfadfsjdkjsdafasdjlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]dfklödsfadfsjdkjsdafasdj lt;brgt;/description description]dfklödsfadfsjdkjsdafasdj lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]dfklödsfadfsjdkjsdafasdj lt;brgt;/description description]dfklödsfadfsjdkjsdafasdj lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt;
Re: [PHP-DB] Problem with rss-feed generation
Hi the first line is badly formed xml version=1.0 encoding=ISO-8859-1 Should be: ?xml version=1.0 encoding=ISO-8859-1 ? Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Problem with rss-feed generation
Niel Archer wrote: Hi the first line is badly formed xml version=1.0 encoding=ISO-8859-1 Should be: ?xml version=1.0 encoding=ISO-8859-1 ? ok by beginning the php-code with ?php I fixed the problem. Unfortunately my RSSowl tell me that there must be other errors in the xml-formating. And I don't got a detailed information what RSSowl dislike in the xml-file. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Problem with rss-feed generation
Hi ok by beginning the php-code with ?php I fixed the problem. Unfortunately my RSSowl tell me that there must be other errors in the xml-formating. And I don't got a detailed information what RSSowl dislike in the xml-file. Try opening it in a browser. Opera, for example, tells you what error it encounters. That's how I identified your initial error. Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] chat
how i can create web-mail by using phpmysql
Re: [PHP-DB] Problem with rss-feed generation
Niel Archer wrote: Hi ok by beginning the php-code with ?php I fixed the problem. Unfortunately my RSSowl tell me that there must be other errors in the xml-formating. And I don't got a detailed information what RSSowl dislike in the xml-file. Try opening it in a browser. Opera, for example, tells you what error it encounters. That's how I identified your initial error. firefox tells me that it dislike the closing xml-tag. In my quanta-editor it seems that can be difficulties with the tagend of the opening xml-line of the second position of the questionmark. Regards, Ruprecht ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE rss PUBLIC -//Netscape Communications//DTD RSS 0.91//EN http://my.netscape.com/publish/formats/rss-0.91.dtd; rss version=0.91 channel title(RSS 2.0)/title linkhttp://www.bla.com//link descriptionDie neuesten Artikel in Bla-Bereich ; /description languagede/language managingEditorRuprecht Helms [EMAIL PROTECTED]/managingEditor webMasterRuprecht Helms [EMAIL PROTECTED]/webMaster item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; dsklfdsafdsajfasdf lt;brgt;/description descriptiondsklfdsafdsajfasdflt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; Test lt;brgt;/description descriptionTestlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; Testantwort lt;brgt;/description descriptionTestantwortlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; xx lt;brgt;/description descriptionxxlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]Test erneuter Testlt;brgt;/description description]Test erneuter Test lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]Test erneuter 2. Test lt;brgt;/description description]Test erneuter 2. Test lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]Test erneuter 2. Test lt;brgt;/description description]Test erneuter 2. Test lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; dfklödsfadfsjdkjsdafasdj lt;brgt;/description descriptiondfklödsfadfsjdkjsdafasdjlt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]dfklödsfadfsjdkjsdafasdj lt;brgt;/description description]dfklödsfadfsjdkjsdafasdj lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]dfklödsfadfsjdkjsdafasdj lt;brgt;/description description]dfklödsfadfsjdkjsdafasdj lt;brgt; - /description /item item title/title link/link descriptionlt;table CELLPADDING=quot;5quot; CELLSPACING=quot;0quot; border=quot;0quot; align=quot;leftquot;gt;lt;trgt;lt;tdgt;lt;#47;tdgt;lt;#47;trgt;lt;#47;tablegt; lt;brgt; ]dfklödsfadfsjdkjsdafasdj lt;brgt;/description description]dfklödsfadfsjdkjsdafasdj
Re: [PHP-DB] Problem with rss-feed generation
Hi Niel, firefox tells me that it dislike the closing xml-tag. In my quanta-editor it seems that can be difficulties with the tagend of the opening xml-line of the second position of the questionmark. Because you missed the space in front of it. You really need to find out more about XML and RSS specifications. This isn't a PHP or Db problem so doesn't belong on this list. Maybe I thought that someone of the member have worked with a dynamicly rss-feed generator. I use some mysql-tables for content within the feed. Du you know a good tutorial for XML and RSS, possible relating with PHP. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Problem with rss-feed generation
Hi Du you know a good tutorial for XML and RSS, possible relating with PHP. Not a tutorial, no. I got my information from the specification documents. You should consider changing your method. Instead of creating the RSS/XMl file manually, try using one of the PHP extensions that will generate XML for you, like the PEAR XML_Query2XML package which converts SQL SELECT results into valid XML data. Or PECL's xmlwriter. Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php