Line wrapping



I need to write some code to wrap lines for printing. The data to
print is XML. I have not found that the classes that I have found
allow you to choose which characters are used as line breaks.
For example org.apache.xml.serialize.OutputFormat does not do this.

What class is good for this?

Right now I use the following code:

OutputFormat format = new OutputFormat(input);
format.setIndenting(true);
format.setIndent(2);
format.setLineWidth(lineLen);
format.setLineSeparator(lineSep);
Writer out = new StringWriter();
XMLSerializer serializer = new XMLSerializer(out, format);
serializer.serialize(input);
--
(\__/) M.
(='.'=) Due to the amount of spam posted via googlegroups and
(")_(") their inaction to the problem. I am blocking some articles
posted from there. If you wish your postings to be seen by
everyone you will need use a different method of posting.

.



Relevant Pages

  • Re: XML Comment Screwed - Possibly a bug in VB??
    ... Don`t get upset about postings in the groups,, some people over here are ... internal workings of XML. ... perhaps tighten up the warning messages so that the warning message can be ... ''' If the Bonds flag is set in the security record we have at ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Printing in Publisher 2007
    ... As a workaround you could try setting copies in the printer folder. ... the printer, click printing preferences. ... loss (everything is brand new - all drivers updated) and they've led me to ... I have read other postings ...
    (microsoft.public.publisher)
  • Re: Line wrapping
    ... allow you to choose which characters are used as line breaks. ... I've tried this code but it presents the whole XML document all in one ... The code snippet I posted nearly does this, ... If you wish your postings to be seen by ...
    (comp.lang.java.programmer)
  • Difference in manuals Color
    ... Was doing one of my ebay searches for machines I own and just noticed ... Big Guns manuals about 4 postings but on one the color was ... red with graphics but no other printing. ...
    (rec.games.pinball)
  • Re: Line wrapping
    ... allow you to choose which characters are used as line breaks. ... I've tried this code but it presents the whole XML document all in one ... The code snippet I posted nearly does this, ... If you wish your postings to be seen by ...
    (comp.lang.java.programmer)