Re: XML vs. PHP manual???
| From: | Scott Fletcher | Date: | Wed, 24 Jul 2002 14:03:45 +0000 |
| Subject: | Re: XML vs. PHP manual??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-109305@lists.php.net to get a copy of this message | ||
I alway knew there is an easier way to do that. Problem is just don't know
it. I like your example and it is an wonderful example. I can use it. One
quick question. The function, "posttofunction()", is that a make-believe
function? I check PHP.net and it doesn't have this function, so I assume
you just put it there to make a point about the whole script.
Thanks,
FletchSOD
"Richard Lynch" <rich@phpbootcamp.com> wrote in message
news:php.general-109230@news.php.net...
> >I read the useful document about XML in PHP on
> >http://www.analysisandsolutions.com/code/phpxml.html. I
> >still haven't
made
> >much progress on XML. I'm still confuse about XML. I had to write XML
> >stuffs on the client-side with the build-in XML request and it doesn't
make
> >sense that the client brower should be communicating to credit bureau
> >network without going to my company's PHP webserver to that credit
bureau.
> >So, it meant I have to use the post request that would send the data to
my
> >company's PHP webserver and somehow convert it into xml and send it to
that
> >credit bureau by cURL. Is there a way to do that??
>
> As I recall, only the DOM model can easily add/alter "nodes" to an XML
> document. SAX would be not useful... (Or was it the other way
around...?)
>
> Anyway, you may be trying too hard :-)
>
> Unless your credit bureau is incredibly different from all the rest, it
will
> *PROBABLY* be easiest to just do something not unlike:
>
> <?php
> # import expected $_POST variables if register_globals is off.
> $xml = <<<ENDOFXML
> <XML>
> <NAME>$name</NAME>
> <ADDRESS>$address</ADDRESS>
> .
> .
> .
> </XML>
> ENDOFXML;
> $result = posttohost('http://yourcreditbureau.com',
> $xml);
> ?>
>
> I mean, really, do you want to make life all complicated by trying to
create
> some giant XML data structure when all you really need is one stupid
little
> never-changing string with the data in it?
>
> If you're building a complex application to *TRADE* tons of info with your
> credit bureau, you'd want to "scale up" and generalize your XML-creation
> with complex data structures so you can easily alter it when they change
the
> DTD out from under you or whatever.
>
> But if you are just sending the one kind of XML request off to the credit
> bureau, don't make your life complicated for no real reason.
>
> Just my opinion.
>
> --
> Like Music? http://l-i-e.com/artists.htm
> I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
> major distro). Need to record live events (mixed already) to stereo
> CD-quality. Soundcard Recommendations?
> Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
> post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
> audio-to-disk.