I would like to visualize with XCrySDen crystal structures and charge densities as calculated by program XXX. How to proceed?
You need to transform your data into the XSF data format, and then load the converted XSF file. Here you can find a template for a simple unknown2xsf converting program written in Fortran 77. And here you can read how to specify the scalar-field in the XSF format. Jens Kunstmann has written an XSF-converting tool xsfConvert. Currently it can convert the data from the TB-LMTO-ASA and VASP programs to the XSF format.