I have a HTML string like below,
Code
<div class="col-md-1" style="margin-right:-20px" />
<div style="cursor: pointer; padding: 0px 3px; float: left;" class="Fav aLogin" title="Bookmark" />
The above html prepared by XSLT transform and I am trying to add the above html into existing div element dynamically. The problem here's when it rendered then the closing div is recognized. I found that self closing is NOT valid for div element and it should be proper closing .
I tried changing the xml output to the following but still the self closing tag is appearing.
Code
<xsl:output method="html" indent="yes" />
<xsl:output method="xhtml" indent="yes" />
So, I need a way to replace the tags which is self closing first in the HTML string then add it to the DOM. Please help to suggest.
NOTE: I hv found some ways to add some dummy elements/text within the self closing div but it is NOT feasible in my case as i have so many XSLT which has self closing tags in it.