2. merge the HTML files into a single file (e.g. with SoftSnow Merger)
3. convert the HTML file to XHTML (e.g. with Simpletidy)
or, if you don't mind spending $19.95, you can use ABC Amber CHM Converter:
reads CHM files and converts them to PDF (doesn't require Adobe Acrobat to be installed), HTML (single file and web-site), RTF (MS Word doesn't need to be installed), HLP, TXT (ANSI and Unicode), DOC (MS Word), DBF, MDB (MS Access), CSV, XML, XLS (MS Excel), Clipboard"