Page 1 of 1
Xml conversion
Posted: Fri Mar 16, 2007 3:07 am
by sarbas
Hi to all ,
I want to display the out put of the php file into xml format. I've no clue.If anyone can help me?
Waiting for your hopeful reply
Sarbas.
Posted: Fri Mar 16, 2007 5:53 am
by volka
Please be more specific.
XML
Posted: Fri Mar 16, 2007 6:44 am
by sarbas
volka wrote:Please be more specific.
Sorry Volka,
I didn't specify complete details about this issue here i try to describe,
I need a script that will take a few scripts that I have and convert them into PHP functions which can be called with URL parameters. The script needs to change the HTML output into XML and then create a script which reads that XML and displays it like the original HTML looked.
Re: XML
Posted: Fri Mar 16, 2007 7:03 am
by volka
sarbas wrote:I need a script that will take a few scripts that I have and convert them into PHP functions which can be called with URL parameters. The script needs to change the HTML output into XML and then create a script which reads that XML and displays it like the original HTML looked.
You want to write a script (let's call it convert.php) that reads the source code of another script (let's call it old.php) like
Code: Select all
<?php
echo '<form name=xyz method=post action=lalala.php>';
...
echo '</form>
?>
and then writes a converted script (let's call it new.php) like
Code: Select all
<?php
function foobar($param) {
echo '<form name="xyz" method="post" action="lalala.php">';
...
echo '</form>';
}
?>
?
Posted: Fri Mar 16, 2007 7:20 am
by sarbas
Thanks Again volka,
But I don't know how to bring xml output after running php file.
For Example I've test.php.
test.php consists of some tables and data. After executing test.php i'll get the results in xml format.
just i want result of test.php in xml format.
Waiting for your hopeful reply
Sarbas.
Posted: Fri Mar 16, 2007 7:22 am
by volka
hm, my last post was a question. Anyway...
If you only want to convert the output from valid (but not x-)html to xhtml you might be interested in
http://de2.php.net/tidy