Documentation Formats

  • HTML
  • Markdown
  • XML

HTML

<p>This code finds the minimum value in an array</p>
<pre><code>int min = nums[0];
for(int i = 0; i < nums.length; i++){
  if(nums[i] < min){
    min = nums[i];
  }
}</code></pre>

HTML

Pros:

  • Flexible & Style-able
  • Read Directly in Browser

Cons:

  • Lots of Boilerplate
  • Difficult to Maintain

Markdown

This code finds the minimum value in `array`
```java
for(int i = 0; i < nums.length; i++){
  if(nums[i] < min){
    min = nums[i];
  }
}
```

Markdown

Pros:

  • Easy to Read & Write
  • Supported in GitHub

Cons:

  • Requires Rendering
  • Less Flexible

XML

<student>
    <firstName>Willie</firstName>
    <lastName>Wildcat</lastName>
    <wid>8888888</wid>
    <degreeProgram>BCS</degreeProgram>
</student>

XML

Pros:

  • Easy to Parse
  • Nearly Universal

Cons:

  • Verbose
  • Better for Data