Commons Digester
  1. Commons Digester
  2. DIGESTER-35

Digester.parse(File) is crippled in two aspects

    Details

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

      Operating System: All
      Platform: All

      Description

      1. It constructs an InputSource with a Reader instead of with an InputStream,
      thus effectively forcing the XML parser to interpret the XML file as it is
      written in default platform encoding instead of honoring eventual <?xml
      encoding="..."?> declarations.

      2. It does not set the system id of the input source to "file://" +
      file.getAbsolutePath(), therefore making it impossible to resolve external
      entities referenced by relative URLs in the XML file.

      A patch is attached that fixes both problems.

        Activity

        Hide
        Attila Szegedi added a comment -

        Created an attachment (id=1682)
        Patch that fixes both problems

        Show
        Attila Szegedi added a comment - Created an attachment (id=1682) Patch that fixes both problems
        Hide
        Craig McClanahan added a comment -

        Fixed in nightly build 20020428. Thanks for the patch!

        Show
        Craig McClanahan added a comment - Fixed in nightly build 20020428. Thanks for the patch!

          People

          • Assignee:
            Unassigned
            Reporter:
            Attila Szegedi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development