Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-508

Node.depthFirst() and Node.breadthFirst ommit the root element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-5
    • 1.0-beta-5
    • groovy-jdk
    • None

    Description

      If you build a node tree from
      <root>
      <first>
      <second/>
      </first>
      </root>

      and then do

      node = tree.depthFirst()

      node['second'] returns a list of one element

      node['first'] returns an empty list

      this is because the root element isn't in the list returned by depthFirst() or breadthFirst()

      Attachments

        Activity

          People

            tug John Wilson
            tug John Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: