Inbetween the different elements are whitespace, which most browsers also allow you to reference, IE being the exception.
So in some browsers the 5th element is the third element
- 0 - whitespace
- 1 - 1st li
- 2 - whitespace
- 3 - 2nd li
- 4 - whitespace
- 5 - 3rd li
- 6 - whitespace
Whereas in other browsers, the 2nd element is what you're after.
- 0 - 1st li
- 1 - 2nd li
- 2 - 3rd li
A safer way to get the element you're after is to use getElementsByTagName instead
The other problem that you've facing is that the LI element doesn't actually have a value in and of itself. You'll be needing the childNode of the LI element, that being the text node itself.
var baldwins = document.getElementById("baldwins");
var william = baldwins.getElementsByTagName('LI');
document.write(william.firstChild.nodeValue); // William