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

Node.toString() should print out XML representation

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Future Project
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: xml
    • Labels:

      Description

      Today, JAXP DOM nodes don't really implement toString() in a meaningful way for users.
      For example, you get something like:

        [#document: null] (for document)

      Or:

        [myElement: null] (for an element)

      Given the nature of toString() and debugger support, the toString() method should assist
      developers to debug problems.
      For this, it would be really really nice if this prints out an XML fragment.

      Currently, to print out an XML representation of a DOM tree, you'd need to write a serious
      amount of code (I think the shortest is to use identity Transformer), and even the shortest
      one is not practical to do from inside a debugger.

        Attachments

          Activity

            People

            • Assignee:
              nwalshsunw Norman Walsh (Inactive)
              Reporter:
              kkawagucsunw Kohsuke Kawaguchi (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: