Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5073477

DOMResult.setNextSibling doesn't work correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 5.0
    • 5.0
    • xml

        The implementation of the method isn't correctly implemented, and as a result the following uni test fails:

                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                dbf.setNamespaceAware(true);
                DocumentBuilder parser = dbf.newDocumentBuilder();
                Document dom = parser.parse(Bug.class.getResourceAsStream("test2.xml"));

                DOMResult r = new DOMResult();
                
                r.setNode(dom.getDocumentElement());
                r.setNextSibling(r.getNode().getFirstChild());

        test2.xml:
        <?xml version="1.0"?>
        <root>
          <f1/>
          <f2/>
          <f3/>
        </root>

        ###@###.### 2004-07-13
        ###@###.### 2004-07-13

              kkawagucsunw Kohsuke Kawaguchi (Inactive)
              kkawagucsunw Kohsuke Kawaguchi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: