Thread: [phpXML] My changes to xml.php -and- an RSS/RDF parser example
Brought to you by:
bs_php,
nigelswinson
From: <tom...@di...> - 2001-10-04 12:15:25
Attachments:
phpXMLrssrdfparser_TJH.php
|
Hello all, =================================================== My changes to "xml.php" Near line 125 // var $entities = array ( "&" => "&", "<" => "<", ">" => ">","'" => "&apos", '"' => """ ); // == Error: in the val for "'" the semicolon is missing in "&apos" // Also tried alternates of ’ and ‘ (for "'") but no help // DANGER The substitutions for ' and " have been removed == by TJH === var $entities = array ( "&" => "&", "<" => "<", ">" => ">"); Near line 200 function load_file ( $file ) { // Check whether the file exists and is readable. // if ( file_exists($file) && is_readable($file) ) // Does not work for remote files if ( $file ) // === TJH === allows me to read remote files (i.e. via http:// request) // is there a better way to do this for remote files ??????? =================================================== My first attempt -- a RSS/RDF parser Attached is for parsing and rendering RSS/RDF files -- I got it working but I'd appreciate comments on the coding - if feels like a real kludge but I see no other way to do it. Your comments on the coding will be appreciated. =================================================== Many thanks to M.M. for phpXML! Sincerely, Tom Henry |
From: <sp...@or...> - 2001-10-05 10:13:05
|
Hello all The Script works fine. The only little thing all <br/>-tags ar not parsed/put out. What could I do wrong? Greets mike -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <sp...@or...> - 2001-10-05 10:15:25
|
To convert ' to ' can make problems in browser when you use charset=ISO-8859-1 So better delete the hole &apos entry > Von: tom...@di... > Antworten an: us...@li... > Datum: 29 Jun 2001 00:39:09 -0000 > An: us...@li... > Betreff: [phpXML] My changes to xml.php -and- an RSS/RDF parser example > > Hello all, > > =================================================== > My changes to "xml.php" > > Near line 125 > // var $entities = array ( "&" => "&", "<" => "<", ">" => > ">","'" => "&apos", '"' => """ ); > // == Error: in the val for "'" the semicolon is missing in "&apos" > // Also tried alternates of ’ and ‘ (for "'") but no help > // DANGER The substitutions for ' and " have been removed == by TJH === > var $entities = array ( "&" => "&", "<" => "<", ">" => ">"); > > > Near line 200 > function load_file ( $file ) > { > // Check whether the file exists and is readable. > // if ( file_exists($file) && is_readable($file) ) // Does not work > for remote files > if ( $file ) // === TJH === allows me to read remote files (i.e. via > http:// request) > // is there a better way to do this for remote files ??????? > > > =================================================== > My first attempt -- a RSS/RDF parser > > Attached is for parsing and rendering RSS/RDF files -- I got it working but > I'd appreciate comments on the coding - if feels like a real kludge but I > see no other way to do it. > > Your comments on the coding will be appreciated. > > =================================================== > > > Many thanks to M.M. for phpXML! > > Sincerely, > Tom Henry -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <phi...@ls...> - 2001-10-05 10:15:54
|
I am trying to use the RDF/RSS Parser, but I receive the following error for any file that I try; Warning: Invalid range end in /home/httpd/html/xml.php on line 1866 phpXML error: While parsing the XPath expression "//channel" an empty and therefore invalid node-test has been found. Am I missing something? Philip Cohen --------------- Webmaster Large Scale Biology Corporation (707) 446-5501 x354 phi...@ls... > -----Original Message----- > From: tom...@di... > [mailto:tom...@di...] > Sent: Thursday, June 28, 2001 17:39 > To: us...@li... > Subject: [phpXML] My changes to xml.php -and- an RSS/RDF parser example > > > Hello all, > > =================================================== > My changes to "xml.php" > > Near line 125 > // var $entities = array ( "&" => "&", "<" => "<", ">" => > ">","'" => "&apos", '"' => """ ); > // == Error: in the val for "'" the semicolon is missing in "&apos" > // Also tried alternates of ’ and ‘ (for "'") > but no help > // DANGER The substitutions for ' and " have been removed == > by TJH === > var $entities = array ( "&" => "&", "<" => "<", ">" > => ">"); > > > Near line 200 > function load_file ( $file ) > { > // Check whether the file exists and is readable. > // if ( file_exists($file) && is_readable($file) ) // Does > not work > for remote files > if ( $file ) // === TJH === allows me to read remote > files (i.e. via > http:// request) > // is there a better way to do this for remote files ??????? > > > =================================================== > My first attempt -- a RSS/RDF parser > > Attached is for parsing and rendering RSS/RDF files -- I got it > working but > I'd appreciate comments on the coding - if feels like a real kludge but I > see no other way to do it. > > Your comments on the coding will be appreciated. > > =================================================== > > > Many thanks to M.M. for phpXML! > > Sincerely, > Tom Henry -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <tom...@di...> - 2001-10-05 10:15:56
|
Hi Philip, (I'm the one who sent the RSS/RDF parser example) Did you make the changes to the xml.php file that I mentioned in my original post? Just trying to make sure that that isn't the source of the problem before we go any farther. Pls advise... Tom Henry At 05:12 PM 6/29/01 +0000, phi...@ls... wrote: >I am trying to use the RDF/RSS Parser, but I receive the following error for >any file that I try; > >Warning: Invalid range end in /home/httpd/html/xml.php on line 1866 >phpXML error: While parsing the XPath expression "//channel" an empty and >therefore invalid node-test has been found. > >Am I missing something? > > >Philip Cohen >--------------- >Webmaster >Large Scale Biology Corporation >(707) 446-5501 x354 >phi...@ls... > > > -----Original Message----- > > From: tom...@di... > > [mailto:tom...@di...] > > Sent: Thursday, June 28, 2001 17:39 > > To: us...@li... > > Subject: [phpXML] My changes to xml.php -and- an RSS/RDF parser example > > > > > > Hello all, > > > > =================================================== > > My changes to "xml.php" > > > > Near line 125 > > // var $entities = array ( "&" => "&", "<" => "<", ">" => > > ">","'" => "&apos", '"' => """ ); > > // == Error: in the val for "'" the semicolon is missing in "&apos" > > // Also tried alternates of ’ and ‘ (for "'") > > but no help > > // DANGER The substitutions for ' and " have been removed == > > by TJH === > > var $entities = array ( "&" => "&", "<" => "<", ">" > > => ">"); > > > > > > Near line 200 > > function load_file ( $file ) > > { > > // Check whether the file exists and is readable. > > // if ( file_exists($file) && is_readable($file) ) // Does > > not work > > for remote files > > if ( $file ) // === TJH === allows me to read remote > > files (i.e. via > > http:// request) > > // is there a better way to do this for remote files ??????? > > > > > > =================================================== > > My first attempt -- a RSS/RDF parser > > > > Attached is for parsing and rendering RSS/RDF files -- I got it > > working but > > I'd appreciate comments on the coding - if feels like a real kludge but I > > see no other way to do it. > > > > Your comments on the coding will be appreciated. > > > > =================================================== > > > > > > Many thanks to M.M. for phpXML! > > > > Sincerely, > > Tom Henry > > >-- >This message has been sent through the <phpXML/> user discussion list. To >unsubscribe, please visit >https://sslsites.de/mailinglisten/user/us...@li.../ -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <phi...@ls...> - 2001-10-05 10:16:05
|
Hi Tom, Thanks for getting back to me. I believe I have made all of the changes. I have made a few changes that people from the list have provided so I dont know if there is a conflict somewhere in there. I will double check, but I am under the assumption that I have made all of your changes. Philip Cohen --------------- Webmaster Large Scale Biology Corporation (707) 446-5501 x354 phi...@ls... > -----Original Message----- > From: tom...@di... > [mailto:tom...@di...] > Sent: Friday, June 29, 2001 10:46 > To: us...@li... > Subject: [phpXML] Re: [phpXML] My changes to xml.php -and- an RSS/RDF > parser > > > Hi Philip, > > (I'm the one who sent the RSS/RDF parser example) > > Did you make the changes to the xml.php file that I mentioned in my > original post? Just trying to make sure that that isn't the > source of the > problem before we go any farther. > > Pls advise... > > Tom Henry > > At 05:12 PM 6/29/01 +0000, phi...@ls... wrote: > >I am trying to use the RDF/RSS Parser, but I receive the > following error for > >any file that I try; > > > >Warning: Invalid range end in /home/httpd/html/xml.php on line 1866 > >phpXML error: While parsing the XPath expression "//channel" an empty and > >therefore invalid node-test has been found. > > > >Am I missing something? > > > > > >Philip Cohen > >--------------- > >Webmaster > >Large Scale Biology Corporation > >(707) 446-5501 x354 > >phi...@ls... > > > > > -----Original Message----- > > > From: tom...@di... > > > [mailto:tom...@di...] > > > Sent: Thursday, June 28, 2001 17:39 > > > To: us...@li... > > > Subject: [phpXML] My changes to xml.php -and- an RSS/RDF > parser example > > > > > > > > > Hello all, > > > > > > =================================================== > > > My changes to "xml.php" > > > > > > Near line 125 > > > // var $entities = array ( "&" => "&", "<" => "<", ">" => > > > ">","'" => "&apos", '"' => """ ); > > > // == Error: in the val for "'" the semicolon is missing in "&apos" > > > // Also tried alternates of ’ and ‘ (for "'") > > > but no help > > > // DANGER The substitutions for ' and " have been removed == > > > by TJH === > > > var $entities = array ( "&" => "&", "<" => "<", ">" > > > => ">"); > > > > > > > > > Near line 200 > > > function load_file ( $file ) > > > { > > > // Check whether the file exists and is readable. > > > // if ( file_exists($file) && is_readable($file) ) // Does > > > not work > > > for remote files > > > if ( $file ) // === TJH === allows me to read remote > > > files (i.e. via > > > http:// request) > > > // is there a better way to do this for remote files ??????? > > > > > > > > > =================================================== > > > My first attempt -- a RSS/RDF parser > > > > > > Attached is for parsing and rendering RSS/RDF files -- I got it > > > working but > > > I'd appreciate comments on the coding - if feels like a real > kludge but I > > > see no other way to do it. > > > > > > Your comments on the coding will be appreciated. > > > > > > =================================================== > > > > > > > > > Many thanks to M.M. for phpXML! > > > > > > Sincerely, > > > Tom Henry > > > > > >-- > >This message has been sent through the <phpXML/> user discussion > list. To > >unsubscribe, please visit > >https://sslsites.de/mailinglisten/user/us...@li.../ > > > -- > This message has been sent through the <phpXML/> user discussion > list. To unsubscribe, please visit > https://sslsites.de/mailinglisten/user/us...@li.../ -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <tom...@di...> - 2001-10-05 10:16:10
|
Philip: FWIW - I have _not_ made any of the other changes that have been posted - so maybe that's part of it. When you get a chance - set up a test case reverting to the original v1.0 xml.php except with the changes that I made (at least the one so you can get remote files ;-). BTW - I am running the RSS/RDF script on both PHP 4.0.6 under Win32 and 4.0.4pl1 on FreeBSD - both running Apache server. Cheers, Tom At 06:14 PM 6/29/01 +0000, phi...@ls... wrote: >Hi Tom, > >Thanks for getting back to me. I believe I have made all of the changes. I >have made a few changes that people from the list have provided so I dont >know if there is a conflict somewhere in there. I will double check, but I >am under the assumption that I have made all of your changes. > > >Philip Cohen >--------------- >Webmaster >Large Scale Biology Corporation >(707) 446-5501 x354 >phi...@ls... > > > -----Original Message----- > > From: tom...@di... > > [mailto:tom...@di...] > > Sent: Friday, June 29, 2001 10:46 > > To: us...@li... > > Subject: [phpXML] Re: [phpXML] My changes to xml.php -and- an RSS/RDF > > parser > > > > > > Hi Philip, > > > > (I'm the one who sent the RSS/RDF parser example) > > > > Did you make the changes to the xml.php file that I mentioned in my > > original post? Just trying to make sure that that isn't the > > source of the > > problem before we go any farther. > > > > Pls advise... > > > > Tom Henry > > > > At 05:12 PM 6/29/01 +0000, phi...@ls... wrote: > > >I am trying to use the RDF/RSS Parser, but I receive the > > following error for > > >any file that I try; > > > > > >Warning: Invalid range end in /home/httpd/html/xml.php on line 1866 > > >phpXML error: While parsing the XPath expression "//channel" an empty and > > >therefore invalid node-test has been found. > > > > > >Am I missing something? > > > > > > > > >Philip Cohen > > >--------------- > > >Webmaster > > >Large Scale Biology Corporation > > >(707) 446-5501 x354 > > >phi...@ls... > > > > > > > -----Original Message----- > > > > From: tom...@di... > > > > [mailto:tom...@di...] > > > > Sent: Thursday, June 28, 2001 17:39 > > > > To: us...@li... > > > > Subject: [phpXML] My changes to xml.php -and- an RSS/RDF > > parser example > > > > > > > > > > > > Hello all, > > > > > > > > =================================================== > > > > My changes to "xml.php" > > > > > > > > Near line 125 > > > > // var $entities = array ( "&" => "&", "<" => "<", ">" => > > > > ">","'" => "&apos", '"' => """ ); > > > > // == Error: in the val for "'" the semicolon is missing in "&apos" > > > > // Also tried alternates of ’ and ‘ (for "'") > > > > but no help > > > > // DANGER The substitutions for ' and " have been removed == > > > > by TJH === > > > > var $entities = array ( "&" => "&", "<" => "<", ">" > > > > => ">"); > > > > > > > > > > > > Near line 200 > > > > function load_file ( $file ) > > > > { > > > > // Check whether the file exists and is readable. > > > > // if ( file_exists($file) && is_readable($file) ) // Does > > > > not work > > > > for remote files > > > > if ( $file ) // === TJH === allows me to read remote > > > > files (i.e. via > > > > http:// request) > > > > // is there a better way to do this for remote files ??????? > > > > > > > > > > > > =================================================== > > > > My first attempt -- a RSS/RDF parser > > > > > > > > Attached is for parsing and rendering RSS/RDF files -- I got it > > > > working but > > > > I'd appreciate comments on the coding - if feels like a real > > kludge but I > > > > see no other way to do it. > > > > > > > > Your comments on the coding will be appreciated. > > > > > > > > =================================================== > > > > > > > > > > > > Many thanks to M.M. for phpXML! > > > > > > > > Sincerely, > > > > Tom Henry > > > > > > > > >-- > > >This message has been sent through the <phpXML/> user discussion > > list. To > > >unsubscribe, please visit > > >https://sslsites.de/mailinglisten/user/us...@li.../ > > > > > > -- > > This message has been sent through the <phpXML/> user discussion > > list. To unsubscribe, please visit > > https://sslsites.de/mailinglisten/user/us...@li.../ > > >-- >This message has been sent through the <phpXML/> user discussion list. To >unsubscribe, please visit >https://sslsites.de/mailinglisten/user/us...@li.../ -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:14:43
|
Hello all, I hope Michael P. Mehl is reading this list. It becomes dramatically urgent to set up a sourceforge-like CVS system or all this will become quickly a real mess :-)) Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:15:12
|
Hello, OK following is a stupid question , but I=92m not that cat ease with XML. I use XML to store stories (novels) and <phpxml/> to display them. When a CDATA section (and each paragraph is enclosed in a CDATA section to= =20 allow use of <br> for example) is displayed all HTML tags are displayed..=20 as HTML tags, I mean displayed exactly as stored, apparently the browser=20 doesn't interpret the HTML tags=85 Where do I screw up? Thanks in advance Luc PS : I receive each message from this list with a dozen of line : Reply-To:= =20 us...@li... -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <ch...@ar...> - 2001-10-05 10:14:40
|
>PS : I receive each message from this list with a dozen of line : Reply-To: Me too -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:15:15
|
Helloe (bis) As a little precision, I used to display the exact same xml files with Hans= =20 Anderson class.xml.php without any problem. Luc At 11:40 30/06/01 +0000, you wrote: >Hello, > >OK following is a stupid question , but I=92m not that cat ease with XML. > >I use XML to store stories (novels) and <phpxml/> to display them. > >When a CDATA section (and each paragraph is enclosed in a CDATA section to= =20 >allow use of <br> for example) is displayed all HTML tags are displayed..= =20 >as HTML tags, I mean displayed exactly as stored, apparently the browser=20 >doesn't interpret the HTML tags=85 > >Where do I screw up? > >Thanks in advance > >Luc > >PS : I receive each message from this list with a dozen of line :=20 >Reply-To: us...@li... -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:15:03
|
Hello, I solved my HTML tags problem by emptying the following array : var $entities = array ( "&" => "&", "<" => "<", ">" => ">", "'" => "'", '"' => """ ); Am I at risk to break anything ? What is the array intended for ? Thanks in advance Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <mp...@ph...> - 2001-10-08 13:37:31
|
Hi! > It becomes dramatically urgent to set up a sourceforge-like > CVS system or all this will become quickly a real mess :-)) I'm just back from the weekend and have already setup and account at sourceforge.net. Please mail your sourceforge.net usernames to mp...@ph... and I will make you to developers of the project. Best regards... Michael -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |