Forum Moderators: coopster

Message Too Old, No Replies

How do I keep linebreak in XML?

         

roxpace

1:13 am on Mar 29, 2006 (gmt 0)

10+ Year Member



Hi,

I am using XML Parser (SAX) in PHP4.

Now Í am trying to retreive XML data, and it works fine except for one thing, I can not get a text with linebreaks to show up with those, those are gone after passing through the parser and I wanna know how I can maintain the linebreaks and other special characters in an easy way?

Thanks!

coopster

1:16 pm on Mar 29, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member




I can not get a text with linebreaks to show up with those

When you say you cannot get text to show up, are you trying to show it in the browser? What happens if you view source? Are the linebreaks evident in the source?

roxpace

3:17 pm on Mar 29, 2006 (gmt 0)

10+ Year Member



Well the lines are getting "truncated" by the parser as it seems, if I view it as source in the browser it is all truncated.

coopster

4:05 pm on Mar 29, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You may have to post a small example to show where you believe this is happening as it isn't quite clear here yet.

DrDoc

4:52 pm on Mar 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It could also be a faulty parser, as there's nothing saying that the linebreaks should be removed or kept, in which case it would make sense to just leave it as-is.