XML이 있습니다.
<item>
<title>This is title</title>
<description>
<![CDATA[<a href="#"><img src="http://sample.picture.jpg" ></a>
</br>Something...blah blah blah]]>
</description>
</item>
xsl을 사용하여 html로 변환하고 싶지만 출력 html에서는 <a>
태그가 그림이 아닌 텍스트로만 표시됩니다. 그래서 어떻게할까요?
이것은 내 xsl입니다.
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="/item">
<xsl:value-of select="title"/>
<xsl:value-of select="description"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
출력 이스케이프를 비활성화해야합니다. 변화:
<xsl:value-of select="description"/>
에:
<xsl:value-of select="description" disable-output-escaping="yes"/>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다