replaced unicode IsSpace() with proper XML space detection