Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-07-2009
Member
 
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?
Reply With Quote
  #2  
Old 07-07-2009
Member
 
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"/>
Reply With Quote
  #3  
Old 07-07-2009
Member
 
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".
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to Insert line break in XML"
Thread Thread Starter Forum Replies Last Post
How to insert a paragraph break inside a Cell of Microsoft Excel Maaka MS Office Support 2 27-01-2012 07:59 PM
Line break in PHP program Aidan 12 Software Development 4 04-03-2010 10:49 PM
To insert a horizontal line in Word Balamani Windows Software 3 21-10-2009 07:04 PM
How to insert new line in message box Corona Software Development 3 11-08-2009 01:27 PM
Software to break a PDF file from the command line AmdUser Windows Software 2 05-05-2009 02:48 PM


All times are GMT +5.5. The time now is 03:13 PM.