[ https://issues.apache.org/jira/browse/CONFIGURATION-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432060#comment-16432060 ]
Claude Warren commented on CONFIGURATION-652: --------------------------------------------- I have finally gotten back to this issue and think I have a solution. in org.apache.commons.configuration2.XMLConfiguration at line 1138 insert the line marked below. /** * Processes the specified document, updates element values, and adds * new nodes to the hierarchy. * * @param refHandler the \{@code ReferenceNodeHandler} */ public void processDocument(ReferenceNodeHandler refHandler) { updateAttributes(refHandler.getRootNode(), document.getDocumentElement() ); // <-- insert this line NodeTreeWalker.INSTANCE.walkDFS(refHandler.getRootNode(), this, refHandler); } I can create a test for this as well. I assume that a patch containing both would be acceptable here? > FileHandler does not produce root node attributes for XMLConfiguration > ------------------------------------------------------------------------ > > Key: CONFIGURATION-652 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-652 > Project: Commons Configuration > Issue Type: Bug > Components: Interpolation > Affects Versions: 2.1.1, 2.2 > Environment: Java 8 on Linux > Reporter: Claude Warren > Priority: Major > Labels: namespace, xml > Attachments: Test.java > > > I have a case where I need to take a Configuration file and write it as an > XML document. The document should have one or more xmlns properties on the > root node but the xmlns attributes are not output. -- This message was sent by Atlassian JIRA (v7.6.3#76005)