Applying css with out class name
I have a xml file with content
<ul>
<li&g开发者_开发问答t;<info>CSS text formatting </info></li>
</ul>
Where info is a class name in css.When i parse the xml and displayed on a page the css class info is applying on the <li>
tag.This is working in mozilla.But ie is not taking it as a css class.Is their any method to do in IE
The basic problem is that <info>
is not HTML.
Firefox recovers by adding it to the DOM anyway, and you can persuade IE to do the same with document.createElement('info')
.
The correct solution, however, is to transform your XML source into HTML instead of just dropping it into the page.
精彩评论