PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$xml = new DOMDocument;
$xml->loadXML($str_xml);
$xsl = new DOMDocument;
$xml->load($xsl_filename);
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);
But in my XSL document, how do I insert an XSL tag within normal html attribute values ?
Thanks volka. I guess the long version is more readable in the long run.
I was going through the html-source and the img tag wasnt closed. <img src="">
How do I get it to close the tag ? <img src=""/>
EDIT : In the XSL file, use
<xsl:output method="xml" encoding="iso-8859-1" indent="no"/>
instead of
<xsl:output method="html" encoding="iso-8859-1" indent="no"/>
[ Though default is taken as XML if none is specified ]