Re: Easy question about XML parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux