System.Data.XmlToDatasetMap.GetColumnSchema C# (CSharp) Method

GetColumnSchema() public method

public GetColumnSchema ( XmlNode node, bool fIgnoreNamespace ) : object
node System.Xml.XmlNode
fIgnoreNamespace bool
return object
        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];
        }

Same methods

XmlToDatasetMap::GetColumnSchema ( DataTable table, XmlReader dataReader, bool fIgnoreNamespace ) : object