Walbury’s Blog

August 4, 2018

How does one render xml in wordpress?

Filed under: Programming — walbury @ 3:01 am

I just can’t seem to get it to work; I just want to be able to do
a data element and 2 child elements and have them formatted say how IE does it automatically and embedded in a post – I think Stack Overflow does it too.

How about using the “code” option in html?

 

Invisible. Great. No not invisible DELETED. Hmm.

Do we have to replace chr(60) with < etc. and then use code?

<data>
<elemA att1="1" att2="2"/>
<elemB attA="a" attB="b"/>
</data>

Barely adequate. Maybe I need to get a plugin..

One post recommends using pre.
Ok, let’s see;

<data>
    <elemA att1="1" att2="2"/>
    <elemB attA="a" attB="b"/>
</data>

Better, far better. Ok this will have to do.

Create a free website or blog at WordPress.com.