Call xmlNodeGetSpacePreserve with element node

Since libxml2 version 2.9.0, xmlNodeGetSpacePreserve checks that the
argument is an element node:

https://git.gnome.org/browse/libxml2/commit/?id=3e62adbe39f2083c9c2cd3330c320227818fd361