commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Courtney B. Arnold (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-335) XMLConfiguration: Can't disable attribute splitting
Date Mon, 18 Aug 2008 13:07:44 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623346#action_12623346
] 

Courtney B. Arnold commented on CONFIGURATION-335:
--------------------------------------------------

FYI for anyone else who is encountering this bug. The parsing is not a delayed parsing. It
begins parsing the document once you have used it's constructor. So the work around would
be to construct an XMLConfiguration object without any parameters, use the setDelimiterParsingDisabled(true),
then load the xml file. Like so:

	File configurationFile = new File("test.xml");
	XMLConfiguration configuration = new XMLConfiguration();
	configuration.setDelimiterParsingDisabled(true);
	configuration.load(configurationFile);

> XMLConfiguration: Can't disable attribute splitting 
> ----------------------------------------------------
>
>                 Key: CONFIGURATION-335
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-335
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Format
>    Affects Versions: 1.5
>            Reporter: Sergey Vladimirov
>
> My XML configuration has the following attribute:
> <some-element some-attribute="&#x0A;&#x0D;" />
> But XML Configuration is trying to split this string and trims it after splitting. I
don't need this behaviour, but setting setDelimiterParsingDisabled() just changing delimeter
to "|" and not disables attribute trimming.
> Need either to disable trimming/splitting if setDelimiterParsingDisabled() is set to
TRUE (incompatible change), or add something like setParseAttributesAsIs() that will prevent
attributes to be trimmed and splitted

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message