cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam" <sam_na...@rediffmail.com>
Subject Displaying XML document as it is ??
Date Tue, 11 May 2004 18:48:38 GMT
<P>
Hello ppl,<BR>
<BR>
I would like to know the best practice to display a simple XML document as it is on the browser.
say I have an XML document called vector.xml which looks like:<BR>
<BR>
&lt;?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?&gt;<BR>
&lt;!DOCTYPE class SYSTEM &quot;collection.dtd&quot;&gt;<BR>
&lt;class&gt;<BR>
&nbsp; &nbsp; &lt;info&gt;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; &nbsp;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;public class Vector<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; extends AbstractList<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;implements List, RandomAccess,
Cloneable, Serializable<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;The Vector class implements
a growable array of <BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; objects.
Like an array, it contains components that can<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; be
accessed using an integer index. However, the size <BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of
a Vector can grow or shrink as needed to accommodate<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; adding
and removing items after the Vector has been <BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; created.<BR>
&nbsp; &nbsp; &lt;/info&gt;<BR>
&lt;/class&gt;<BR>
<BR>
====================================================================<BR>
<BR>
What would be the best practice to display the contents of &lt;info&gt; element on
the browser as it is without disturbing the allignments, linebreaks etc etc ...<BR>
<BR>
In other words just display it as it looks inside the &lt;info&gt; element.<BR>
<BR>
Any body ....<BR>
<BR>
sam
</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG
SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom"
BORDER=0 VSPACE=0 HSPACE=0></a>

Mime
View raw message