Commons Digester
  1. Commons Digester
  2. DIGESTER-51

Javadoc confusing regarding returning parse results

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      Javadoc states that the way to get the results of a parse back is to first push a 'known' object onto
      the stack. All the examples I have seen use the fact that the parse method simply returns the root
      object off the stack. There is no need (commonly anyway) to push an initial object. The
      documentation appears to overcomplicate the operation of the digester.

        Activity

        Hide
        Craig McClanahan added a comment -

        Thanks for the suggestion! I've added a simple example to the package
        documentation (and made it the first one) that leverages the fact that
        Digester.parse() returns the first value ever pushed.

        Historical tidbit – the original example documentation was written before
        Digester actually knew how to do this, so the only choice you had was pushing an
        object onto the stack first .

        Will be visible in nightly build 20030831.

        Show
        Craig McClanahan added a comment - Thanks for the suggestion! I've added a simple example to the package documentation (and made it the first one) that leverages the fact that Digester.parse() returns the first value ever pushed. Historical tidbit – the original example documentation was written before Digester actually knew how to do this, so the only choice you had was pushing an object onto the stack first . Will be visible in nightly build 20030831.

          People

          • Assignee:
            Unassigned
            Reporter:
            Howard Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development