Try this. Note that you have to quote opening and closing tag's triangle brackets using < and > but other than that it should should work in a natural way.
<?xml version="1.0" ?>
<nlog xmlns="
http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target xsi:type="ColoredConsole" name="console">
<layout xsi:type="LayoutWithHeaderAndFooter">
<header xsi:type="SimpleLayout" text="<root>"/>
<layout xsi:type="Log4JXmlEventLayout" />
<footer xsi:type="SimpleLayout" text="</root>"/>
</layout>
</target>
</targets>
<rules>
<logger name="*" writeTo="console" />
</rules>
</nlog>