added encoding of special characters in XML