using System;
using System.Xml;
namespace MonoTests.stand_alone.WebHarness
{
///
/// Summary description for XmlComparer.
///
public class XmlComparer
{
[Flags]
public enum Flags {
IgnoreNone=0,
IgnoreAttribOrder=1,
}
Flags flags;
bool ignoreWS = true;
string lastCompare = "";
string _actual = "";
string _expected = "";
public XmlComparer (Flags flags, bool ignoreWS)
{
this.flags = flags;
this.ignoreWS = ignoreWS;
}
public XmlComparer (Flags flags) : this (flags, true)
{
}
public XmlComparer () : this (Flags.IgnoreAttribOrder)
{
}
public bool AreEqualAttribs (XmlAttributeCollection expected, XmlAttributeCollection actual)
{
if (expected.Count != actual.Count)
return false;
for (int i=0; i>" : ns + ":" + ln + "=" + atr2.Value;
if (atr2 == null || atr2.Value.Trim().ToLower() != val.Trim().ToLower())
return false;
} else {
if (expected [i].LocalName != actual [i].LocalName)
return false;
if (expected [i].NamespaceURI != actual [i].NamespaceURI)
return false;
if (expected [i].Value.Trim().ToLower() != actual [i].Value.Trim().ToLower())
return false;
}
}
return true;
}
public bool AreEqualNodeList (XmlNodeList expected, XmlNodeList actual)
{
if (expected.Count != actual.Count)
return false;
for (int i=0; i