<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>XML and XmlDataSource Control</title><link>http://forums.asp.net/43.aspx</link><description>All about XML, XSLT, and the XmlDataSource control.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: guestbook with an xml database - problem</title><link>http://forums.asp.net/thread/2348396.aspx</link><pubDate>Fri, 09 May 2008 15:00:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2348396</guid><dc:creator>gtk</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2348396.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2348396</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Now its OK &lt;img src="http://forums.asp.net/emoticons/emotion-11.gif" alt="Cool" /&gt;&lt;/p&gt;&lt;p&gt;Finally, i encoded the post before its saved in xml, and to view it, i decoded it like this:&lt;/p&gt;&lt;p&gt;&amp;lt;%# Server.HtmlDecode(DataBinder. Eval(Container.DataItem, &amp;quot;myElement&amp;quot;).ToString())) %&amp;gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks for your time man &lt;img src="http://forums.asp.net/emoticons/emotion-2.gif" alt="Big Smile" /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: guestbook with an xml database - problem</title><link>http://forums.asp.net/thread/2348158.aspx</link><pubDate>Fri, 09 May 2008 13:25:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2348158</guid><dc:creator>smiling4ever</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2348158.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2348158</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Try this&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;Replace(&lt;span class="st"&gt;&amp;quot;text goes here&amp;quot;&lt;/span&gt;, Environment.NewLine , Server.HtmlEncode(&lt;span class="st"&gt;&amp;quot;&amp;lt;br /&amp;gt;&amp;quot;&lt;/span&gt;))

&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;When you read retrieve the data again use Server.HtmlDecode(datafield)&amp;nbsp;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;Regards&amp;nbsp;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: guestbook with an xml database - problem</title><link>http://forums.asp.net/thread/2348102.aspx</link><pubDate>Fri, 09 May 2008 13:00:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2348102</guid><dc:creator>gtk</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2348102.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2348102</wfw:commentRss><description>&lt;p&gt;I have to encode the xml file and to decode it when displaying the html content?? How to do&amp;nbsp; that? I think that if i try to encode the xml file, the function that binds the xml file to the DataSet and after to the Repeater doesnt work.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: guestbook with an xml database - problem</title><link>http://forums.asp.net/thread/2347859.aspx</link><pubDate>Fri, 09 May 2008 10:49:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2347859</guid><dc:creator>smiling4ever</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2347859.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2347859</wfw:commentRss><description>&lt;p&gt;Yes, it should&lt;/p&gt;&lt;p&gt;Encode that using Server.Encode method and when you want to display it in the asp.net page use server.decode&lt;/p&gt;&lt;p&gt;Did you try that?&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: guestbook with an xml database - problem</title><link>http://forums.asp.net/thread/2347808.aspx</link><pubDate>Fri, 09 May 2008 10:20:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2347808</guid><dc:creator>gtk</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2347808.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2347808</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;thanks for your answer.&lt;/p&gt;&lt;p&gt;I have tried to insert explicity the &amp;lt;br /&amp;gt; in the xml file but then the databind.Eval statement doesnt work (it complaints about the &amp;lt;br /&amp;gt; ).&lt;img src="http://forums.asp.net/emoticons/emotion-43.gif" alt="Confused" /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: guestbook with an xml database - problem</title><link>http://forums.asp.net/thread/2347654.aspx</link><pubDate>Fri, 09 May 2008 09:07:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2347654</guid><dc:creator>smiling4ever</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2347654.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2347654</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;You have to convert these into HTML tags when you save the entry (post). &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;Replace(&lt;span class="st"&gt;&amp;quot;text goes here&amp;quot;&lt;/span&gt;, Environment.NewLine , &lt;span class="st"&gt;&amp;quot;&amp;lt;br /&amp;gt;&amp;quot;&lt;/span&gt;)&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&lt;p&gt;After that you will be able to see the requested formating in the browser.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;HTH&lt;br /&gt;Regards &lt;br /&gt;&lt;/p&gt;</description></item><item><title>guestbook with an xml database - problem</title><link>http://forums.asp.net/thread/2347589.aspx</link><pubDate>Fri, 09 May 2008 08:33:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2347589</guid><dc:creator>gtk</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2347589.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2347589</wfw:commentRss><description>&lt;p&gt;hi,&lt;/p&gt;&lt;p&gt;i created a guestbook with an xml database. User submits the post, the post is saved in the xml file. To view the gusetbook, i use a databind statement in html file like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;lt;%# DataBinder.Eval(Container.DataItem, &amp;quot;elementOfXmlFile&amp;quot;) %&amp;gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The problem is when you try to view the guestbook, the text from the xml file dislpayed all in one line, without the format specified by the user (i mean no paragraphs, no new line etc). I checked the xml file, and noticed that there is a new line character when the user press enter.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;How can i resolve the problem? &amp;nbsp;&lt;/p&gt;</description></item></channel></rss>