public bool CompareReader(XmlReader xrExpected, XmlDiffOption option) { bool bReturn = false; XmlReader xrActual = GetReader(); XmlDiff diff = new XmlDiff(); diff.Option = option; try { bReturn = diff.Compare(xrExpected, xrActual); } catch (Exception e) { CError.WriteLine(e); } finally { xrActual.Dispose(); xrExpected.Dispose(); } if (!bReturn) { CError.WriteLine("Mismatch in XmlDiff"); CError.WriteLine("Actual o/p:"); CError.WriteLine(this.GetString()); } return(bReturn); }
public XmlDiff() { _XmlDiffOption = XmlDiffOption.IgnoreEmptyElement | XmlDiffOption.IgnoreWhitespace | XmlDiffOption.IgnoreAttributeOrder | XmlDiffOption.IgnoreNS | XmlDiffOption.IgnorePrefix | XmlDiffOption.IgnoreDTD | XmlDiffOption.IgnoreChildOrder; }
public bool CompareReader(XmlReader xrExpected, XmlDiffOption option) { bool bReturn = false; XmlReader xrActual = GetReader(); XmlDiff diff = new XmlDiff(); diff.Option = option; try { bReturn = diff.Compare(xrExpected, xrActual); } catch (Exception e) { CError.WriteLine(e); } finally { xrActual.Dispose(); xrExpected.Dispose(); } if (!bReturn) { CError.WriteLine("Mismatch in XmlDiff"); CError.WriteLine("Actual o/p:"); CError.WriteLine(this.GetString()); } return bReturn; }