Never filter nodes.
Inheritance: XmlNavigatorFilter
Exemplo n.º 1
0
 /// <summary>
 /// Position the iterator on the next child content node with a matching node kind.  Return true if such a child
 /// exists and set Current property.  Otherwise, return false (Current property is undefined).
 /// </summary>
 public bool MoveNext()
 {
     if (_needFirst)
     {
         _needFirst = !XmlNavNeverFilter.MoveToFirstAttributeContent(_navCurrent);
         return(!_needFirst);
     }
     return(XmlNavNeverFilter.MoveToNextAttributeContent(_navCurrent));
 }
Exemplo n.º 2
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));
        }