bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/27293] New: Node.insertBefore messing up nodelist.


From: kalle at enrogue dot com
Subject: [Bug classpath/27293] New: Node.insertBefore messing up nodelist.
Date: 24 Apr 2006 20:47:37 -0000

Using the Node method insertBefore to insert child nodes into a node seems to
not work.

After parsing a simple XHTML file into memory, where the <body> element has a
single <br> child element, and doing e.g. 
    body.insertBefore(doc.createTextNode("test"), body.getFirstChild());
the body will have dropped the <br> element from its NodeList as opposed to
putting the new text node right before it; and body.getChildNodes().getLength()
still returns 1, not 2.

Additionally, if both the BR and the new text node are removed from the body,
the getLength() will return first 0, then -1.

[attaching tarball with simple (69 lines) java source demonstrating this bug]


-- 
           Summary: Node.insertBefore messing up nodelist.
           Product: classpath
           Version: 0.90
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kalle at enrogue dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27293





reply via email to

[Prev in Thread] Current Thread [Next in Thread]