Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8219692 DOM and SAX parsers ignore namespace
  3. JDK-8224556

Release Note: New Methods for Creating DOM and SAX Factories with Namespace Support

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: xml
    • Subcomponent:
    • Verification:
      Verified

      Description

      New methods have been added for instantiating DOM and SAX factories with Namespace support by default. These methods are prefixed over their existing counterparts with "NS," which stands for NamespaceAware. Below is a list of the new methods:

       - `newDefaultNSInstance()`
       - `newNSInstance()`
       - `newNSInstance(String factoryClassName, ClassLoader classLoader)`

      Using these new methods, a parser created through the factory will be NamespaceAware by default. For example, the following statement:

          DocumentBuilder db = DocumentBuilderFactory.newDefaultNSInstance().newDocumentBuilder();

      is equivalent to:

          DocumentBuilderFactory dbf = DocumentBuilderFactory.newDefaultInstance();
          dbf.setNamespaceAware(true);
          DocumentBuilder db = dbf.newDocumentBuilder();

        Attachments

          Activity

            People

            Assignee:
            joehw Joe Wang
            Reporter:
            joehw Joe Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: