Results 1 to 3 of 3

Thread: How to Insert line break in XML

  1. #1
    Join Date
    Apr 2009
    Posts
    68

    How to Insert line break in XML

    I am using XML to display news on a site, but cant get a space between articles, If you could help it would be great.

    Code:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <image>
    <pic>
    <decription>first line n\second line</decription >
    </pic>
    It works fine but everything is written to one line in the document. I do the same and create a HTML using XSLT and it contains line breaks. How do i get line breaks in XSLT?

  2. #2
    Join Date
    Dec 2008
    Posts
    202

    Re: How to Insert line break in XML

    if you're going to have multiple instances of the this display table you'll want to use classes instead of id's:

    Code:
    .postbody{color:#000;text-align:left;border:1px solid #000; border-top:0px solid #000;margin-bottom:10px;}
    
    <td class="postbody"></td>
    You may also try using the following output method.
    Code:
    <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>

  3. #3
    Join Date
    Jan 2006
    Posts
    211

    Re: How to Insert line break in XML

    there is a way to fix this problem. Flash does not like 'white space' used in xml files. its just a simple little piece of code. this code looks something like this:

    Code:
    var createObject = new XML();
    createObject.ignoreWhite = true;
    createObject.load("fileToLoad.xml");
    The initial property for linefeed-treatment= is "treat-as-space". If you want to respect the linefeeds created by your XML authors, then use the value "preserve". You could use copy-of and other ways to do an identity transform, but those are more typing for the same thing in this case. Depending on how you want the "formatted text" to be displayed, you may have to set all three of these properties to get output similar to "pre".

Similar Threads

  1. Replies: 2
    Last Post: 27-01-2012, 07:59 PM
  2. Line break in PHP program
    By Aidan 12 in forum Software Development
    Replies: 4
    Last Post: 04-03-2010, 10:49 PM
  3. To insert a horizontal line in Word
    By Balamani in forum Windows Software
    Replies: 3
    Last Post: 21-10-2009, 07:04 PM
  4. How to insert new line in message box
    By Corona in forum Software Development
    Replies: 3
    Last Post: 11-08-2009, 01:27 PM
  5. Software to break a PDF file from the command line
    By AmdUser in forum Windows Software
    Replies: 2
    Last Post: 05-05-2009, 02:48 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,551,827.60237 seconds with 17 queries