+ Post New Thread
Results 1 to 2 of 2
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 ...
  1. #1
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    4,002
    Thank Post
    983
    Thanked 477 Times in 398 Posts
    Blog Entries
    12
    Rep Power
    98

    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?

  2. #2

    Join Date
    May 2008
    Location
    Cheshire
    Posts
    299
    Thank Post
    49
    Thanked 27 Times in 24 Posts
    Rep Power
    19
    Hi ittech

    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 ;
    (no spaces)

    Also replace the "\n" with:
    & # 10 ;
    (again no spaces)

    Hope this helps



SHARE:
+ Post New Thread

Similar Threads

  1. XP SP3 breaks folder redirection
    By SpuffMonkey in forum Windows
    Replies: 19
    Last Post: 8th February 2010, 11:50 AM
  2. What Vista Breaks
    By ricki in forum Windows Vista
    Replies: 16
    Last Post: 7th April 2008, 08:41 PM
  3. Paid breaks/lunchbreaks?
    By duncane in forum Educational IT Jobs
    Replies: 17
    Last Post: 3rd September 2007, 10:08 PM
  4. Any XML gurus?
    By TechMonkey in forum Web Development
    Replies: 4
    Last Post: 2nd February 2007, 01:40 PM
  5. Morning/lunch breaks?
    By pinemarten in forum General Chat
    Replies: 18
    Last Post: 22nd December 2005, 08:33 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •