Groovy
  1. Groovy
  2. GROOVY-3983

Using xpath returns arraylist instead of nodelist

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: 1.6.7
    • Fix Version/s: None
    • Component/s: XML Processing
    • Labels:
      None
    • Environment:
      Windows Vista

      Description

      I just moved code from grails 1.1 to grails 1.2.

      I am parsing an XML structure similar to
      <Items><Item>...</Item><Item>...</Item></Items>

      My groovy code looks like
      for (item in doc.Items.Item)

      {...}

      It used to be that doc.Items.Item returned a Node List and then the variable item got bound to each Item from xml.

      Now the doc.Items.Item returns a one element ArrayList whose single element is the NodeList from before.
      So now item gets bound to the entire Item NodeList.

      This seems like a bug to me.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Paul King
            Reporter:
            Andrew Ressler
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development