Documentation generation is the process of creating the ocumentation at different levels of abstraction from the source code for a legacy system. The main goal is to help the stakeholders to understand the system with tations at the appropriate abstraction level. We follow an architecture reconstruction method to create an architectural model of the system and we use a documentation generation technique to re-document its architecture. In this article, we present our XML based approach for generating the architectural documentation of a software system.