internal static bool IsDocumentElementTable (XmlElement top,
ArrayList ignoredNamespaces)
{
foreach (XmlAttribute attr in top.Attributes) {
if (attr.NamespaceURI == XmlConstants.XmlnsNS
#if NET_2_0
|| attr.NamespaceURI == XmlConstants.XmlNS
#endif
)
continue;
if (ignoredNamespaces != null &&
ignoredNamespaces.Contains (attr.NamespaceURI))
continue;
// document element has attributes other than xmlns
return true;
}
Hashtable existingTables = new Hashtable ();
foreach (XmlNode n in top.ChildNodes) {
XmlElement el = n as XmlElement;
if (el == null)
continue;
if (GetElementMappingType (el, ignoredNamespaces,
existingTables)
== ElementMappingType.Simple)
return true;
}
return false;
}