Javascript select content which is inside the tag
<p>I have a problem selecting the content inside a tag.
Here is the example:</p>

<pre><code>&lt;li&gt;aaaa&lt;/li&gt;
&lt;li&gt;bbbb&lt;/li&gt;
&lt;li&gt;cccc&lt;/li&gt;
</code></pre>

<p>I want to select the <code>aaaa bbbb cccc</code> and store them in an array. 
If I use <code>document.getElementsByTagName</code>, it will store the <code>&lt;li&gt;&lt;/li&gt;</code>tags as well. How can I just pick the content? </p>