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

XMLConfiguration and attributes on the root node

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None

      Description

      With XMLConfiguration it is not possible to change the value of an attribute of the root element.

      New attributes on the root level can be created, e.g.:

      XMLConfiguration config = new XMLConfiguration();
      config.addProperty("[@test]", "true");

      would create a new "test" attribute of the root element. However if this configuration is saved and loaded again, a

      config.setProperty("[@test]", "false");

      only temporarily changes the value: getProperty() returns the new value, but when the configuration is saved, the old value is written.

        Attachments

          Activity

            People

            • Assignee:
              oheger Oliver Heger
              Reporter:
              oheger Oliver Heger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: