Korialstrasza
Gawd
- Joined
- Jan 21, 2004
- Messages
- 561
This is a tough one for me.
I'm trying to fetch SQL results as XML to be used in a PHP document. Right now, I have 2 files: page.php and xmlgrabber.php
The "page.php" has a template and stuff powering it, so I can't modify the headers in it. The "xmlgrabber" page connects to MySQL and displays the results in XML. Now, how do I get the data from "xmlgrabber.php" into "page.php"? I can't just include() because of the headers, and DOMobj->load() apparently won't load php files, just .xml.
Is there a trick out there you guys can tell me about?
Thanks for your help!
edit: just had a thought....
Maybe I'm going about this wrong! Should I maybe be loading the xmlgrabber page into page.php using ajax xmlhttprequest?
edit 2: just tried it
It loaded the data into page.php, but it lost the xml formatting. Am I on the correct path at least? Is this where xslt comes into play?
I'm trying to fetch SQL results as XML to be used in a PHP document. Right now, I have 2 files: page.php and xmlgrabber.php
The "page.php" has a template and stuff powering it, so I can't modify the headers in it. The "xmlgrabber" page connects to MySQL and displays the results in XML. Now, how do I get the data from "xmlgrabber.php" into "page.php"? I can't just include() because of the headers, and DOMobj->load() apparently won't load php files, just .xml.
Is there a trick out there you guys can tell me about?
Thanks for your help!
edit: just had a thought....
Maybe I'm going about this wrong! Should I maybe be loading the xmlgrabber page into page.php using ajax xmlhttprequest?
edit 2: just tried it
It loaded the data into page.php, but it lost the xml formatting. Am I on the correct path at least? Is this where xslt comes into play?