Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Comparing XML Document while one is empty

Help
(t0)²
2009-05-25
2013-03-03
  • (t0)²
    (t0)²
    2009-05-25

    Hi,

    I'm testing an application that returns an empty file (without any element).
    The Java XML parser raised an :
    org.xml.sax.SAXParseException: Premature end of file.
    but I want XMLUnit to keep going and be able to compare with an empty DOM.

    Is it possible ?

    Thanks,
    Tony

     
    • (t0)²
      (t0)²
      2009-05-27

      any update ?
      I'm using XMLUnit 1.2, on Windows 2000 SP4. JRE 1.5.0.

      Thanks,
      Tony

       
    • Stefan Bodewig
      Stefan Bodewig
      2009-05-27

      No, there is no way to tell XMLUnit to process an empty file as an empty Document instance.  XMLUnit doesn't inspect the content at all but only passes it on to the parser.