There's more than one way to create XUL content. Here's how to do so using PHP libraries.
The fourth and final way is the subject of this hack: to generate XUL procedurally on a remote host and stream the content like a web page into Mozilla. This hack uses PHP to create the XUL content.
PEAR (http://pear.php.net) is a collection of reusable PHP libraries. One such PEAR library is XML_XUL, which allows remote generation of Mozilla's XUL using PHP's XML DOM. You can find the PHP XUL Libraries at http://pear.php.net/package/XML_XUL
While it is great to see XUL getting such widespread support, generating XUL in this fashion is a big design choice. In reality, all the programmer is doing is creating an extra unnecessary layer on top of XUL, which blurs the distinction between the XUL user interface (UI) and its data. If you view your network-enabled service as a data service (for example, a stock market feed), don't do this. If you view your network-enabled service as remote application delivery or as a media-oriented content-delivery solution ...