Question

I'm generating documentation for a VB.Net project, and trying to show a sample XML configuration.

The best I could do so far is:

''' <summary>
''' Description
''' </summary>
''' <remarks>
''' <para>&lt;element&gt;</para>
''' <para>  &lt;child&gt;value&lt;/child&gt;</para>
''' <para>&lt;/element&gt;</para>
''' </remarks>

This shows up as:

<element>
<child>value</child>
</element>

I would like it to show as formatted XML, but at this point, I would be happy with just getting the indentation working.

Was it helpful?

Solution

If you are using Sandcastle, the documentations suggests to embed your Xml code example into a <![CDATA[]]> like this:

''' <summary>
''' ...
''' </summary>
''' <example>
''' <code language="xml" title="Xml Code sample">
''' <![CDATA[
''' <?xml version="1.0" encoding="utf-8"?>
''' <element>
'''   <child>value</child>
''' </element>
''' ]]>
''' </code>
''' </example>

I did not have the chance to test this yet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top