Tuesday, November 10, 2009

Writing HTML/XML in Blogspot

Sometimes you need to write code, but Blogspot doesn't make it easy on you, as it interprets your HTML/XML instead of displaying it. This is what you shall do:

Replace all the < in your code with &lt;
Replace all the > in your code with &gt;

<?xml version="1.0"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>

Perfectly formatted code, just the way you wanted it!

No comments:

Post a Comment

Related Posts with Thumbnails