posts containing xml snippets
-
Hi,
I can’t seem to post correctly posts containing snippets of xml. I’d like to use use the code tag for formatting along the lines of
<code>
<books><book author="fred" title="life of fred"/></books>
</code>but the xml gets stripped out and the
tags remain when I publish the post.Has anyone any ideas on how to do accomplish this correctly
Thanks in advance
Tom
-
Posting code examples is a HUGE headache.
Try this tool: http://www.destraynor.com/c2h.html
-
Thanks engtech
I should of realised I needed to use change the
<and>characters to use the>and<escape sequences ! -
-
Assuming that you were talking about this post, http://tcdev.wordpress.com/2007/01/23/getting-reflector-to-run-using-the-correct-runtime/
it looks like there’s still problems with smartquotes that would prevent the code from being cut-and-pastable.
I never did figure out how to get past smartquotes: http://wordpress.com/forums/topic.php?id=5755&replies=5
-
Wrapping the code in a
<PRE>will prevent smartquotes. Wrapping the code in a<TEXTAREA>will not.Combining PRE and TEXTAREA will crash your web browser if you try to edit the post again (and doesn’t fix the problem).
-
- The topic ‘posts containing xml snippets’ is closed to new replies.