I am trying to display some XML code in a WPMU (1.3.1) post and am unable to do so despite trying various plugins. Using those plugins, I can get HTML code to display fine, but not XML code. Is anyone aware of solutions to do this?
In a "developer blog" I want to be able to include code snippets of XML code. I would like to do this without having to manually convert all the < and > tags into the appropriate character entities. I have tried the following plugins:
- Code Markup:
http://www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin/
- Code Autoescape:
http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/
- Preserve Code Formatting:
http://www.coffee2code.com/archives/2005/03/29/plugin-preserve-code-formatting/
I also looked at Code Viewer ( http://elasticdog.com/2004/09/code-viewer/ ) but would prefer NOT to store my XML code in separate files.
In all of these cases, I have followed the relevant instructions and installed the files into /plugins/. I have gone into WPMU Site Admin and allowed the plugin to be activated. I have then gone into a specific blog and enabled the plugin. I have then followed the instructions for how to markup the code, generally all with < code > . I have rich text editing turned OFF (although I did also try this with text editing turned on). I have also tried posting via MarsEdit as well.
For HTML code, these plugins are working fine. I can see the HTML code displayed in the blog post.
However, for XML code, the code just... disappears.
Here is an example of some XML code that I'm trying to display (let's see if it displays here):
<?xml version= "1.0"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US"
root = "MYRULENAME">
<rule id="MYRULENAME">
<one-of>
<item>
utterance
<tag> <![CDATA[ <mySlotName "my return value"> ]]> </tag>
</item>
</one-of>
</rule>
</grammar>
In all posts, this XML code gets removed.
Does anyone have any suggestions for what is going on here?
Thank you in advance,
Dan