Hello.. I am having my news posts in xml file. I am parsing my xml by REXML and it works fine. I am using a method .text to parse the information between <post></post>. The problem is when i try to add paragraphs (<p></p>) to make my posts more readable. It works only when i dont use .text method, but then in my xhtml i can also see <post></post>. How can i get rid of that and leave the <p>? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Pabloz wrote:> I am having my news posts in xml file. I am parsing my xml by REXML and > it works fine. I am using a method .text to parse the information > between <post></post>. The problem is when i try to add paragraphs > (<p></p>) to make my posts more readable. It works only when i dont use > .text method, but then in my xhtml i can also see <post></post>. How can > i get rid of that and leave the <p>?When you embed HTML payload inside an XML data store, the HTML should be escaped, so the XML parser doesn''t just treat it as more XML. If you view the file with a text editor, you should see <post> blah blah <p> blah </p> </post>. Then .text will reconstitute the <p> marks. -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip wrote:> > When you embed HTML payload inside an XML data store, the HTML should be > escaped, so the XML parser doesn''t just treat it as more XML. > > If you view the file with a text editor, you should see <post> blah blah > <p> blah </p> </post>. > > Then .text will reconstitute the <p> marks. > > -- > Phlip > http://www.greencheese.us/ZeekLand <-- NOT a blog!!!thx..it works perfect. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---