[os_xml] use isspace() instead of manual checking