how to include newlines in StreamingMarkupBuilder output?

View: New views
2 Messages — Rating Filter:   Alert me  

how to include newlines in StreamingMarkupBuilder output?

by Walter Gillett-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I switched from MarkupBuilder to StreamingMarkupBuilder in order to create mixed content, which works great. But the resulting text output is a single long line of text, unlike the output from MarkupBuilder. Any suggestions on how to make the output of StreamingMarkupBuilder have newlines in it? I tried to find documentation for StreamingMarkupBuilder and was unsuccessful. Downloaded the source code but it is uncommented, and looking at the code for this class didn't give me any insights.

-Walter Gillett




Re: how to include newlines in StreamingMarkupBuilder output?

by Peter Ledbrook-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/5/16 Walter Gillett <walter_gillett@...>:
> I switched from MarkupBuilder to StreamingMarkupBuilder in order to create
> mixed content, which works great. But the resulting text output is a single
> long line of text, unlike the output from MarkupBuilder. Any suggestions on
> how to make the output of StreamingMarkupBuilder have newlines in it? I
> tried to find documentation for StreamingMarkupBuilder and was unsuccessful.
> Downloaded the source code but it is uncommented, and looking at the code
> for this class didn't give me any insights.

I believe that one ugly is approach is to use "mkp.yield '\n'" or
possibly "mkp.yieldUnescaped '\n'".

Cheers,

Peter

--
Software Engineer
G2One, Inc.
http://www.g2one.com/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email