Removed wrong check for XML-Doc != '' - not possible for parsed docs.