# Rendering xml as html in text field

**URL:** <https://forum.kirupa.com/t/rendering-xml-as-html-in-text-field/176326>\
**Category:** Uncategorized\
**Created:** [January 22, 2006, 11:02pm UTC](https://forum.kirupa.com/t/rendering-xml-as-html-in-text-field/176326 "2006-01-22T23:02:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tay511](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@Tay511](https://forum.kirupa.com/u/Tay511)\
**Post date:** [January 22, 2006, 11:02pm UTC](https://forum.kirupa.com/t/rendering-xml-as-html-in-text-field/176326/1 "2006-01-22T23:02:04Z")

</div>

Hi,

I have a simple xml file with this structure.

\<?xml version=“1.0” encoding=“iso-8859-1”?\>  
\<content\>  
\<page name=“Page Name”\>  
\<text\>  
\<p\>This is line 1…\</p\>  
\<p\>This is line 2…\</p\>  
\<p\>This is line 3…etc\</p\>  
\</text\>  
\</page\>  
\</content\>

I can update a text field with the page name with - xmlData.firstChild.childNodes[0].attributes.name but I cannot get another text field to show the text content rendered as html.

The ‘render as html’ option is selected but the \<p\> tags don’t render as expected.

What am I doing wrong?? I’m thinking it’s something simple!

T
