Create() public static method

Return a singleton XmlNavigatorFilter that never filters any nodes.
public static Create ( ) : XmlNavigatorFilter
return XmlNavigatorFilter
Exemplo n.º 1
0
        /// <summary>
        /// XPathNodeType.All: Filters all nodes
        /// XPathNodeType.Attribute: Filters attributes
        /// XPathNodeType.Namespace: Not allowed
        /// XPathNodeType.XXX: Filters all nodes *except* those having XPathNodeType.XXX
        /// </summary>
        public XmlNavigatorFilter GetTypeFilter(XPathNodeType nodeType)
        {
            if (nodeType == XPathNodeType.All)
            {
                return(XmlNavNeverFilter.Create());
            }

            if (nodeType == XPathNodeType.Attribute)
            {
                return(XmlNavAttrFilter.Create());
            }

            return(XmlNavTypeFilter.Create(nodeType));
        }