/// <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));
}