[jdom-interest] preserving linefeeds and carriage returns in
transform.
Jason Hunter
jhunter at servlets.com
Thu Oct 30 14:18:17 PST 2003
If you use XMLOutputter in its default configuration it doesn't do any
beautification and it'll output whitespace exactly as held within the
Document.
-jh-
Robert Priest wrote:
> Hello,
>
> I know that the documentation says for XmlOutputter
> (http://www.jdom.org/docs/apidocs/org/jdom/output/XMLOutputter.html)
>
> says:
>
> "In the case where the only content between the start and end tags is
> textual, the start tag, text, and end tag are all printed on the same line.
> "
>
> But is there anyway around this?
> In my stylesheet I have a VBScript function :
> <script language="vbscript">
> function doSomething(test)
> if test = 1 Then
> MsgBox("got 1")
> Else
> MsgBox("Got Something Other Than 1")
> End if
> end function
> </script>
>
> but when I transform this with xml I get that all on one line:
> <script language="vbscript">function doSomething(test) if test = 1 Then
> MsgBox("got 1") Else MsgBox("Got Something Other Than 1") End if end
> function</script>
>
> I would like that on separate lines. I know msxml2 does it. It should look
> like:
>
> <script language="vbscript">
> function doSomething(test)
> if test = 1 Then
> MsgBox("got 1")
> Else
> MsgBox("Got Somethin
> End if
> end function
> </script>
>
> Does anyone have any insight as to how that can be achieved using JDOM?
>
> Thanks in advance.
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
>
More information about the jdom-interest
mailing list