petermichaux@yahoo.com wrote:[color=blue]
> Hi Andy,
>
> Thanks for the good feedback!
>
> I was guessing that strings must be bad because if the DOM functions
> exist there must be a reason. The simplicity of the strings was
> appealing and the DOMDocument->loadXML() documentation lead me in the
> string direction.[/color]
Strings are not bad,
it improves your code readability,
ok but the performance is not that good.
But what if performance is not very important.
Note, you forgot one other method.
I have xsl and xml files with php code in it between processing
instructions:
<?php
?>
Now i load the documents in a DOM (zml and xslt),
then i do the transformation and in the end i do
a eval("?>".$tranform_output_xml."<?"); to run the php code
inside the generated xnl,
this is very good for code generating.
If you can use java use the xslt compiler, it
compiles xslt documents to bytecode files wich
are fast. (google on xalan)
[color=blue]
>
> I should have picked a different example for the database technique. I
> wouldn't actually do that example that way. I understand what you are
> saying about round tripping. Thanks for mentioning it though.
>
> I need to think up a better example. Perhaps I'll be back later:)
>
> -Peter
>[/color]