Im facing a problem that while logging informations to an xml file, i need the header and footer to append automatically between my custom tags. I followed the code what u have written but still i face the same error (No header and footer tags....)Can u send me the details on how to achieve this using programatically...(not using NLog.config)