Menu

selectively turning off checking of elements

2003-02-21
2003-02-27
  • Bhaskar Mulpuri

    Bhaskar Mulpuri - 2003-02-21

    In my xml message that I need to test, one of the elements include dynamic information (as attribute values), such as a timestamp. The system that generates this xml fills this dynamically. Is there any way I can turn off checking for this element?

    This way I can call the assertXMLEqual(..) method with a FileReader (that contains the control xml) and a SringReader (that has the test xml).

    If this is not possible, any ideas of how I can achieve this...

    Thanx
    Bhaskar

     
    • tim bacon

      tim bacon - 2003-02-27

      You can use a custom DifferenceListener implementation to vary how to respond when a Difference is found between control and test XML. See the IgnoreTextAndAttributeValuesDifferenceListener for an example of such a class.

      Hope this helps,

      Tim

       

Log in to post a comment.