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

Additional helper methods for DOMCategory to make it feel more like XmlParser/Slurper

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-6
    • 1.1-beta-3
    • XML Processing
    • None
    • Patch

    Description

      The attached patch and testcase extends DOMCategory to also support:

      node.text()
      node.name()
      node.parent()
      nodelist.iterator()

      While not strictly necessary, these extensions make DOM processing closer to XmlSlurper and XmlParser usage.

      There are some other discrepancies between DOMCategory and XmlSlurper and XmlParser usage but I will make this the subject of a subsequent issue.

      Attachments

        1. DomCategory.patch
          3 kB
          Paul King

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: