Showing code (particularly xml) to a wordpress.com blog

WordPress.com makes it a bit challenging to show xml code in your blog. To show code in your blog, just wrap it in these tags:

‘left bracket’sourcecode language=”css”‘right bracket’
put your your code here
‘left bracket’/sourcecode‘right bracket’

Note: I spent too much time trying to show left and right bracket characters. Finaqlly I gave up and typed the words in single quotes. To use this tip, replace the words with the characters.

The language parameter controls how the code is syntax highlighted. Multiple languages beyond xml are supported:

    actionscript3

 

    bash

 

    clojure

 

    coldfusion

 

    cpp

 

    csharp

 

    css

 

    delphi

 

    erlang

 

    fsharp

 

    diff

 

    groovy

 

    html

 

    javascript

 

    java

 

    javafx

 

    matlab (keywords only)

 

    objc

 

    perl

 

    php

 

    text

 

    powershell

 

    python

 

    r

 

    ruby

 

    scala

 

    sql

 

    vb

 

    xml

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: