Retain Line Feeds for Tag replacement

 2 posts  » Share this        Feedicon
Replies: 1 - Last Post: June 24, 2010 07:12
by: narsing
showing 1 - 2 of 2
 
Posted: May 06, 2010 17:20 by Bijal
I'm using ODFDOM to search and replace tags within an odt file.
All works well, however now I need to load a multi-line string containing line feeds and retain them in the odt file.

When I perform the Node replacement the linefeeds are gone. Is there a way to retain line feeds?


String myString = " text1 \r\n text2 \r\n text3 \r\n";

Node textBit = textBits.item(bits);
Sring text = textBit.getTextContent();
...

replacedText = text.replace("<<" + templateFieldName + ">>", myString); textBit.setTextContent(replacedText);
 
Posted: June 24, 2010 07:12 by narsing
Hello All,
I have to display the gorizontal line below Header on the page. Please let me know which API ishould use.
Replies: 1 - Last Post: June 24, 2010 07:12
by: narsing
  • Powered by:
Terms of Use; Privacy Policy; Copyright ©2008-2010 (revision 20100827.958a3e4)
 
 
loading
Please Confirm