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

DocumentBuilderFactory.setCoalescing() is not working properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • xml
    • 1.2.0
    • 1.2.0
    • sparc
    • solaris_8
    • Verified

      If I have
      <?xml version="1.0"?>
      <html>
      <![CDATA[ <xml>This is not parsed</xml>]]> yet
      </html>

      and setCoalescing(true). I expect to get
      <html>
      <xml>This is not parsed</xml> yet
      </html>
      after DocumentBuilder.parser() is called.

      Using crimson, it returns 1 ChildNode:<xml>This is not parsed</xml> yet
      Using xerces2, it returns 3 childnode. node0: <cr>, node1: <xml>This is not parsed</xml>, node2: yet

      According to setCoalescing definition, seems that crimson is doing the right thing.

      To reproduce, execute torun in attched file.

            egoei Edwin Goei (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: