W3C home > Mailing lists > Public > www-html@w3.org > April 2009

Display xml content in a <div>

From: Sudhindra Kulkarni <kulkarni.sudhi@gmail.com>
Date: Fri, 10 Apr 2009 08:59:25 +0530
Message-ID: <5eb98a9b0904092029r722c4106i32c1adcbc7887965@mail.gmail.com>
To: www-html@w3.org
Hi,

I have the following sample file and I want to be able to display xml
content as xml only...

<body>
  <div>
  <animal>
  <name>cat</name>
  <legs>4</legs>
  </animal>
  </div>

  </body>

The current output on browsers is cat 4 ... I want the entire xml
<animal><name>... displayed..

I guess all the tags are dropped since < is not escaped and <animal> is not
a valid tag...

I need to do this since I cannot escape all < with &lt since the xml is
fetched from a dvice..

Thanks,

Sudhi
Received on Friday, 10 April 2009 07:23:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:15 GMT