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

new convenience methods in DOMCategory: InputStream.parse; Reader.parse; Node.xpath

    XMLWordPrintableJSON

Details

    Description

      parse methods should be short for:

      def fac = DocumentBuilderFactory.newInstance()
      def builder = fac.newDocumentBuilder()
      def doc = builder.parse(new FileInputStream('filename'))
      def root = doc.documentElement

      Node.xpath should be short for
      org.apache.xpath.XPathAPI.eval(node, 'xpath')

      Not sure whether we should also overload get and/or getAt[] with xpath meaning, since that will conflict with current element/attribute access

      Attachments

        Activity

          People

            paulk Paul King
            codevise Dierk König
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: