You might look at the the XSLT syntax. You might also want to look at CDATA (section 2.7 of the XML spec) > <tag xml="example"> > <start><p><p><b></start> > <end></b></p></end> > </tag> Becomes <tag xml="example"> <start><![CDATA[<p><b>]]></start> <end><![CDATA[</b></p>]]></end> </tag>