internal DataTable HandleTable(XmlElement node)
{
XmlElement typeNode;
Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS) ||
FEqualIdentity(node, Keywords.XDR_ELEMENT, Keywords.XDRNS), "Invalid node type");
// Figure out if this really is a table. If not, bail out.
typeNode = FindTypeNode(node);
string occurs = node.GetAttribute(Keywords.MINOCCURS);
if (occurs != null && occurs.Length > 0)
if ((Convert.ToInt32(occurs, CultureInfo.InvariantCulture) > 1) && (typeNode == null))
{
return InstantiateSimpleTable(_ds, node);
}
occurs = node.GetAttribute(Keywords.MAXOCCURS);
if (occurs != null && occurs.Length > 0)
if (!string.Equals(occurs, "1", StringComparison.Ordinal) && (typeNode == null))
{
return InstantiateSimpleTable(_ds, node);
}
if (typeNode == null)
return null;
if (IsXDRField(node, typeNode))
return null;
return InstantiateTable(_ds, node, typeNode);
}