Re: [PHP-DB] Passing XML
Is this what you have in mind? $url = 'http://website.com/document.xml'; $str = implode('', file($url)); $str = contains the xml doc and retains formatting [spaces, newlines] $url could be a doc on the local server as well. --- Hugh Bothwell [EMAIL PROTECTED] wrote: I'm not sure how you mean; it depends on where the data is coming from. I count three ways you can do this: 1. pass the XML filename (or URL) to the script via GET or POST 2. pass the XML source to the script via POST 3. upload the file via POST and call the script More details on what you're trying to accomplish would help. Niel Zeeman [EMAIL PROTECTED] wrote in message 9heo93$q9j$[EMAIL PROTECTED]">news:9heo93$q9j$[EMAIL PROTECTED]... Hi there Is there anyway of passing a xml document to a php page as raw data. What I want to do is eg. send a page a xml document and recieve a response ( in xml ) from that page. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Passing XML
From: olinux o [EMAIL PROTECTED] To: Hugh Bothwell [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, June 29, 2001 10:25 PM Subject: Re: [PHP-DB] Passing XML Is this what you have in mind? $url = 'http://website.com/document.xml'; $str = implode('', file($url)); $str = contains the xml doc and retains formatting $url could be a doc on the local server as well. Sure, that would be one way to implement option #1; or, as in the XML entry in the PHP manual, paging through the file in 4k chunks (better if you're parsing large files); but passing the url as a parameter instead of defining it explicitly, ie http://myserver/script.php?url=http%3A%2F%2Fwebsite.com%2Fdocument.xml Or you could post the whole XML source to the script (this could be useful for interactive testing of an XML-generating script); or you could upload an XML file and have the script parse it (I'm really not sure how this would be useful, but you could :-) Also note, if you want to get XML back again, maybe you should look at the XSLT functions. --- Hugh Bothwell [EMAIL PROTECTED] wrote: I'm not sure how you mean; it depends on where the data is coming from. I count three ways you can do this: 1. pass the XML filename (or URL) to the script via GET or POST 2. pass the XML source to the script via POST 3. upload the file via POST and call the script More details on what you're trying to accomplish would help. Niel Zeeman [EMAIL PROTECTED] wrote in message 9heo93$q9j$[EMAIL PROTECTED]">news:9heo93$q9j$[EMAIL PROTECTED]... Hi there Is there anyway of passing a xml document to a php page as raw data. What I want to do is eg. send a page a xml document and recieve a response ( in xml ) from that page. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Passing XML
Hi there Is there anyway of passing a xml document to a php page as raw data. What I want to do is eg. send a page a xml document and recieve a response ( in xml ) from that page. I could eg get the result using fopen( 'http://url.com/xml.php' , 'r' ) but how do i send it any data without using for eg. fopen( http://url.com/xml.php?xml=xml_string_document , 'r' ) Any help would be VERY helpfull thanks Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]