Get HTML of an Element (instead of Text)

Hi there,

I want to get html of an element instead of just Text.

For example lets say this is an html element.

<ul class="bar">    <li>one</li>    <li>two</li>    <li>three</li></ul>

So i get following html as String

    <li>one</li>    <li>two</li>    <li>three</li>

Please advise
Thanks

I tried innerHTML via getAttribute and via Javacript, but nothing worked.