Added fsencode support to asXML() method