Re: Easy question about XML parsing
| From: | Jason Barnett | Date: | Fri, 22 Apr 2005 13:39:15 +0000 |
| Subject: | Re: Easy question about XML parsing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-213653@lists.php.net to get a copy of this message | ||
Brian Dunning wrote:
> I've been going through a number of easy XML parsing examples on the
> web, and they all have one thing in common: the XML is in a file, which
> they read in 4K chunks and parse.
>
> My application will be retrieving the XML from a web service, presumably
> like $xml = file_get_contents($url). I was assuming that I could parse
> the XML in memory using that $xml variable, but since NONE of the
> examples I've seen do this, I was wondering if it's a requirement that
> the XML be in a local file, and needing to do the 4K chunk thing.
>
> - Brian
Nope, if the stream will open and put data into $xml then you're fine.
It's not a requirement that the XML file is on the disk, just that it's
available to memory.
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc