Do you have a question? Post it now! No Registration Necessary. Now with pictures!
July 7, 2005, 10:42 pm
rate this thread
I think I am getting very close to figuring out a good method for using
multiple PHP functions to generate parts of a single XML tree (that
will then be transformed to XHTML).
I have found two ways to use PHP to generate the composite XML
DomDocument but do not know how to decide between them. I have made up
an example of each method so you can see them and posted them on my
site so the formatting is a little nicer.
Also, I'm really curious about the pass by reference confusion that is
in method one.
Any suggestions are really appreciated!
Re: PHP generating XML
I figured that out. PHP5 automatically passes object instances by
reference so the & is implicit and unnecessary.
So I don't see anything wrong with using Method 1 but I'm still
interested if there is an argument against it.
One thing is it is not object-oriented programming. I don't know how I
would make it object-oriented and easier to use.