private bool IsValidSiblingType(XPathNodeType type)
{
switch (NodeType)
{
case XPathNodeType.Element:
case XPathNodeType.Text:
case XPathNodeType.SignificantWhitespace:
case XPathNodeType.Whitespace:
case XPathNodeType.ProcessingInstruction:
case XPathNodeType.Comment:
switch (type)
{
case XPathNodeType.Element:
case XPathNodeType.Text:
case XPathNodeType.SignificantWhitespace:
case XPathNodeType.Whitespace:
case XPathNodeType.ProcessingInstruction:
case XPathNodeType.Comment:
return true;
}
break;
}
return false;
}