You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Robert <rm...@bull-enterprises.com> on 2002/09/11 20:35:10 UTC
spacing in config files
I thought this was addressed before, but perhaps someone can help me out
here. I have a config file being used by the Configuration package and
for one of the elements I would like to be able to have the text (value)
in a multi-line format so it is easier to read. The text is a SQL
statement so you can imagine that it can get long. I would like to use
something like:
<tag>
SELECT col1, col2, col3
FROM table
WHERE col1 = 1
AND col2 = 'hey'
</tag>
I've tried putting it in a CDATA section as well as padding with spaces
and such, but it seems that during the read, the carriage return and any
spacing is removed, so it ends up like:
SELECT col1, col2, col3FROM tableWHERE col1 = 1AND col2 = 'hey'
I'm using framework 4.1.2 binary release. Any thoughts, or am I stuck
with one line?
Thanks,
Robert
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: spacing in config files
Posted by Berin Loritsch <bl...@apache.org>.
Use this construct:
<tag xml:spacing="preserve">
SELECT col1, col2, col3
FROM table
WHERE col1 = 1
AND col2 = 'hey'
</tag>
(at least I think it is "preserve"--it should match the
XML spec....)
> -----Original Message-----
> From: Robert [mailto:rmcintosh@bull-enterprises.com]
> Sent: Wednesday, September 11, 2002 2:35 PM
> To: Avalon Dev
> Subject: spacing in config files
>
>
> I thought this was addressed before, but perhaps someone can
> help me out here. I have a config file being used by the
> Configuration package and for one of the elements I would
> like to be able to have the text (value) in a multi-line
> format so it is easier to read. The text is a SQL statement
> so you can imagine that it can get long. I would like to use
> something like:
>
> <tag>
> SELECT col1, col2, col3
> FROM table
> WHERE col1 = 1
> AND col2 = 'hey'
> </tag>
>
> I've tried putting it in a CDATA section as well as padding
> with spaces and such, but it seems that during the read, the
> carriage return and any spacing is removed, so it ends up like:
>
> SELECT col1, col2, col3FROM tableWHERE col1 = 1AND col2 = 'hey'
>
> I'm using framework 4.1.2 binary release. Any thoughts, or am
> I stuck with one line?
>
> Thanks,
> Robert
>
>
> --
> To unsubscribe, e-mail:
> <mailto:avalon-dev-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>