# \[PHP\] Generate HTML from XML & XSL

**URL:** <https://forum.kirupa.com/t/php-generate-html-from-xml-xsl/242006>\
**Category:** programming\
**Created:** [October 20, 2007, 9:34pm UTC](https://forum.kirupa.com/t/php-generate-html-from-xml-xsl/242006 "2007-10-20T21:34:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [October 20, 2007, 9:34pm UTC](https://forum.kirupa.com/t/php-generate-html-from-xml-xsl/242006/1 "2007-10-20T21:34:04Z")

</div>

I can successfully generate an HTML file from a XML & XSL file using xslt\_process(). However, the resultant HTML file is not well formatted. Tags are not well nested, lines are too long, etc… Is there any way to define nesting rules and such when generating the HTML?
