Web Development Thread, XML line breaks in Coding and Web Development; I'm constructing some XML from a mysql database. Everything works fine simply by manually building the XML tags and closing ...
11th July 2008, 11:46 AM #1
XML line breaks
I'm constructing some XML from a mysql database. Everything works fine simply by manually building the XML tags and closing it at the end.
My only problem is the text fields that are returned in the XML do not show the linebreaks that are stored in the mysql database.
Anyone know how to return them properly?
14th July 2008, 11:21 AM #2
- Rep Power
Not sure if I understand your problem 100%. The database uses "\r" for carriage return and "\n" for new line feed. However, as far as I know (I might be wrong, as my xml is quite limited). I'm not sure if xml uses carriage return. As this is white space.
Try replacing the "\r" with:
& # 13 ;
Also replace the "\n" with:
& # 10 ;
(again no spaces)
Hope this helps
By SpuffMonkey in forum Windows
Last Post: 8th February 2010, 10:50 AM
By ricki in forum Windows Vista
Last Post: 7th April 2008, 07:41 PM
By duncane in forum Educational IT Jobs
Last Post: 3rd September 2007, 09:08 PM
By TechMonkey in forum Web Development
Last Post: 2nd February 2007, 12:40 PM
By pinemarten in forum General Chat
Last Post: 22nd December 2005, 07:33 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)