To publish xml in a textarea


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers To publish xml in a textarea
# 1  
Old 06-19-2008
To publish xml in a textarea

Hi everyone,

When I use

echo "<textarea cols ="75" rows ="20" align="center">"
echo |cat xyz.sh
echo "</textarea>"

I am able to view the file xyz.sh in the text area
but when I try to echo an xml

echo "<textarea cols ="75" rows ="20" align="center">"
echo |cat xml.txt
echo "</textarea>"

I get the following error

A string literal was expected, but no opening quote character was found. Error processing resource 'http://flman800.nat.bt....
<textarea cols =75 rows =20 align=center>


Any idea why this xml cannot is not getting echoed into the textarea
# 2  
Old 06-19-2008
Please post an example xml.txt
# 3  
Old 06-20-2008
One thing I can think of is that you will need to escape special characters before you put in the textarea. Actually this is true for anything that is put in the HTML. Say, for XML tags such as <test> you will need to escape as &lt;test&gt; otherwise even if you manage to make its way to HTML it is not going to output correctly.
# 4  
Old 06-21-2008
Another alternative is to use a CDATA section i.e. <![CDATA[ your markup ]]>
 
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Web Development

Publish notification

hi All I use tomcat server to publish war file. How to send an notification to users via the application screen and it should dismiss once user clicks X mark. Any suggestions ? (1 Reply)
Discussion started by: anil529
1 Replies

2. UNIX and Linux Applications

Publish notification

hi All I use tomcat server to publish war file. How to send an notification to users via the application screen and it should dismiss once user clicks X mark. Any suggestions ? (0 Replies)
Discussion started by: anil529
0 Replies

3. Programming

Unable to publish data

Hi All, In my application, we are using Publish/subscribe model implemented in JAVA and when I implemented it on windows to windows os,it is working fine and able to publish the right data and even when I am trying the same between two different OS i.e between Windows and Solaris sparc or... (1 Reply)
Discussion started by: smartgupta
1 Replies
Login or Register to Ask a Question