Fixed exception when parsing XML with comments.

Fixed exception when parsing XML with comments
@e-kolpakov Is it the canonical way to check whether the node is a comment? I would imagine we are not the only ones to want to ignore comments during XML processing. In any case, between the two, I stil prefer the explicit check in this case - besides avoiding to silence other scenarios unintendedly, it also makes it clearer to read.