Help - Search - Members - Calendar
Full Version: XML
Hostony Board > General Support > PHP/MySQL
kanasta
how do i put php into xml files when the xml starts with
<?xml

i want some php functions to generate/echo xml output
MartinB
if you want generate xml output from a php file, maybe you want to put xml "in" php files, not the inverse. right?
MartinB
something like http://freshmeat.net/projects/xmlwritercla...lease_id=100612
Niels
Add this on the top of your php file:

<?php header("Content-type: application/xhtml+xml"); ?>

Should work wink.gif

-
Niels
Niels
QUOTE(mblendinger @ Aug 22 2005, 05:44 PM)
if you want generate xml output from a php file, maybe you want to put xml "in" php files, not the inverse. right?
*


I agree
kanasta
I was told to start with
CODE
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="file.xsl"?>


hence the question about the <? marks

well I'm still trying to think thru how/where to use xml vs html
Niels
The
CODE
<?php header("Content-type: application/xhtml+xml"); ?>

is just to make sure the php file will output as xml, you wil still have to use xml "headers" for example:

CODE
<?
header("Content-type: application/xhtml+xml");
echo'<?xml version="1.0" encoding="utf-8" ?>';
echo'<?xml-stylesheet type="text/xsl" href="file.xsl"?>';

your php vs xml  stuff here , etc

?>


-
Niels
kanasta
hmm. ic.

Is it possible to require a full <?php in certain files?
my html uses the shortcut <? right now
where is this setting on my cpanel?

also, my <link rel="stylesheet"
font face settings don't seem to take in XML.
size/colors are OK tho. ohmy.gif

thanks for your help
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here