public object GetColumnSchema(XmlNode node, bool fIgnoreNamespace)
{
Debug.Assert(node != null, "Argument validation");
TableSchemaInfo tableSchemaInfo = null;
XmlNode nodeRegion = (node.NodeType == XmlNodeType.Attribute) ? ((XmlAttribute)node).OwnerElement : node.ParentNode;
do
{
if (nodeRegion == null || nodeRegion.NodeType != XmlNodeType.Element)
{
return null;
}
tableSchemaInfo = (TableSchemaInfo)(fIgnoreNamespace ? _tableSchemaMap[nodeRegion.LocalName] : _tableSchemaMap[nodeRegion]);
nodeRegion = nodeRegion.ParentNode;
} while (tableSchemaInfo == null);
if (fIgnoreNamespace)
return tableSchemaInfo.ColumnsSchemaMap[node.LocalName];
else
return tableSchemaInfo.ColumnsSchemaMap[node];
}