Howdy_McGee
Howdy_McGee

Reputation: 10673

Show HTML tags in XML

If I want to show:

<html xmlns="http://www.w3.org/1999/xhtml">

tags in HTML, how can I register this as Data instead of HTML?

Upvotes: 1

Views: 1250

Answers (3)

Kirill Polishchuk
Kirill Polishchuk

Reputation: 56202

... or escaping special characters:

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

Upvotes: 2

mu is too short
mu is too short

Reputation: 434795

Wrap them in a CDATA section:

<some_xml_element>
    <![CDATA[
        <p>Where is<br/>pancakes house?</p>
    ]]>
</some_xml_element>

Upvotes: 4

9000
9000

Reputation: 40894

You can give either HTML tags or your XML markup a differrent namespace. You'll have to write something like <foo>...<h:html>...</h:html>...</foo>.

If you don't need to parse the HTML tags, you can just put the whole thing inside a <![CDATA[...]]>.

Upvotes: 1

Related Questions