Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-279

Add convenience XmlOptions setter methods with boolean arguments

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Version 2.2
    • Fix Version/s: TBD
    • Component/s: XmlObject
    • Labels:
      None

      Description

      I would suggest that XmlOptions was extended with convenience methods like
      public XmlOptions setSavePrettyPrint(boolean flag)
      for all the no-arg setters.

      This would also allow us to do stuff like
      XmlOptions customOptions = new XmlOptions(standardOptions).setSavePrettyPrint(false);
      There is currently no elegant way of turning off options.

      In addition, this would allow us to configure XmlOptions as part of our spring configuration. For example:

      <bean name="saveXmlOptions" class="org.apache.xmlbeans.XmlOptions">
      <property name="saveNamespacesFirst" value="true">
      <property name="savePrettyPrint" value="true">
      </bean>

      This is not currently possible, since the spring cannot call no-arg setters, so we have to use a custom BeanFactory.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nielsull Niels Ull Harremo√ęs
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: