simplexml_load_string();

simplexml_load_string();

am 18.07.2007 15:41:01 von Ross Hulford

$data = simplexml_load_string(file_get_contents($url));

Is there a php4 version of this or does this only work in 5? How can I get
around it?


R.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: simplexml_load_string();

am 18.07.2007 21:01:28 von lvo

Try to do a search in PEAR.PHP.NET
I remember I've seen something like this for php4, but not sure where.

Lance

-----Original Message-----
From: Ross [mailto:ross@aztechost.com]
Sent: Wednesday, July 18, 2007 8:41 AM
To: php-general@lists.php.net
Subject: [PHP] simplexml_load_string();


$data =3D simplexml_load_string(file_get_contents($url));

Is there a php4 version of this or does this only work in 5? How can I =
get=20
around it?


R.=20

--=20
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: simplexml_load_string();

am 19.07.2007 01:51:19 von Larry Garfield

On Wednesday 18 July 2007, Ross wrote:
> $data = simplexml_load_string(file_get_contents($url));
>
> Is there a php4 version of this or does this only work in 5? How can I get
> around it?

There might be a user-space generic XML parser available somewhere, but
nothing that will map directly to SimpleXML. SimpleXML uses language
features that don't exist in PHP 4. The best answer is to use PHP 5 and let
PHP 4 die a respectable death, as most of the world seems to have decided to
do[1].

[1] http://gophp5.org/

--
Larry Garfield AIM: LOLG42
larry@garfieldtech.com ICQ: 6817012

"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: simplexml_load_string();

am 21.07.2007 01:49:45 von Richard Lynch

On Wed, July 18, 2007 8:41 am, Ross wrote:
> $data = simplexml_load_string(file_get_contents($url));
>
> Is there a php4 version of this or does this only work in 5? How can I
> get
> around it?

If you absolutely have to support PHP 4, be prepared for a rather long
and tedious testing period where various funky things in different XML
incarnations will break whichever XML package reader you choose.

At least, that was my experience in all PHP XML solutions before PHP 5.

There are 3 to choose from in PHP 4, I think, plus at least one
popular one that's not built-in, but is just more PHP code.

As Larry points out, dealing with XML is a VERY good reason to go with
PHP 5 and abandon PHP 4.

While nobody can guarantee the next 6 months or year outlook of PHP 4,
I would expect a lot of webhosts are going to phase it out now that an
official EOL has been announced.

http://www.php.net/index.php#2007-07-13-1

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php