DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30597>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30597 HierarchicalConfigurationXMLReader stores comments as text nodes Summary: HierarchicalConfigurationXMLReader stores comments as text nodes Product: Commons Version: Nightly Builds Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I am seeing behavior in the HierarchicalConfigurationXMLReader class (v 1.5 2004/07/05 09:54:17) where XML Comments are inappropriately stored as text nodes. When using ConfigurationXMLDocument (ConfigurationXMLDocument.java,v 1.6 2004/06/24 14:01:03) to write the configuration back out to a file, the original XML comments are written out as concatenated text nodes. Here are the steps for recreation: 1) Read in this configuration using the hierarchicalXml designator: <config> <!-- Settings for the Wizard, now externalized via Perl. --> <Wizard> <!-- Location of perl binary. --> <PerlPath>C:/cygwin/bin/perl</PerlPath> <!-- Perl script and arguments for the wizard. --> <WizardScript>C:/foo/wizard.pl</WizardScript> </Wizard> </config> 2) Pass the HierarchicalXMLConfiguration instance to ConfigurationXMLDocument to write() to a file: ConfigurationXMLDocument configDoc = new ConfigurationXMLDocument(config); Writer out = new BufferedWriter(new FileWriter(outputFile)); configDoc.write(out); 3) The resulting XML (written out by Dom4J) demonstrates that all comments were read in and concatenated into text nodes: <config>Settings for the Wizard, now externalized via Perl. <Wizard>Location of perl binary. Perl script and arguments for the wizard. <PerlPath>C:/cygwin/bin/perl</PerlPath> <WizardScript>C:/foo/wizard.pl</WizardScript> </Wizard> </config> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]