ofXml: add close method. Closes #2311