private XPathNodeType BasicNodeType(XPathNodeType type) { if(type == XPathNodeType.SignificantWhitespace || type == XPathNodeType.Whitespace) { return XPathNodeType.Text; } else { return type; } }