Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-316

Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5
    • 1.6
    • None
    • None
    • Sun JDK 6 on Debian GNU/Linux

    Description

      When using the XMLConfiguration(HierarchicalConfiguration) constructor for copying an XMLConfiguration e.g. originally read from the XML string <e a="v">example</e>, the "example" text can still be retrieved from the copy using getString(""). When saving the copy to an XML file, however, the text is not written; the resulting XML string is just <configuration a="v"/>. I will attach sample code that illustrates this.

      Whether it is intended that the name of the top-level element gets lost as well, I don't know (but that is not my focus here).

      Attachments

        1. output.txt
          0.2 kB
          Daniel Kraft
        2. Test.java
          1.0 kB
          Daniel Kraft

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            oheger Oliver Heger
            da_kraft Daniel Kraft
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment