Would I be right in saying the following files are equilavent, except
first on is HTML and second one is XML?
Code:
<?
echo "<h1>Hello world!</h1>".<br>;
echo "This is HTML";
?>
Code:
<?
echo "<page>";
echo "<hello>Hel lo";
echo "<world>wor ld</world>";
echo "</hello>";
echo "<text>This is XML</text>";
echo "</page>";
?>
The above example I think illustrates my problem as as far as I can
see even to send "Hello world" to the screen I've got to write twice
as much code, and I'd still have to write an XSL file to convert it
into HTML anyway.
Perhaps this illustrates my confusion. Should I be trying to write php
files to generate XML or should I be trying to write XML files that
generate PHP. I know you can intergrate things like javescript into a
XML file so can you also do this with PHP?
first on is HTML and second one is XML?
Code:
<?
echo "<h1>Hello world!</h1>".<br>;
echo "This is HTML";
?>
Code:
<?
echo "<page>";
echo "<hello>Hel lo";
echo "<world>wor ld</world>";
echo "</hello>";
echo "<text>This is XML</text>";
echo "</page>";
?>
The above example I think illustrates my problem as as far as I can
see even to send "Hello world" to the screen I've got to write twice
as much code, and I'd still have to write an XSL file to convert it
into HTML anyway.
Perhaps this illustrates my confusion. Should I be trying to write php
files to generate XML or should I be trying to write XML files that
generate PHP. I know you can intergrate things like javescript into a
XML file so can you also do this with PHP?
Comment