Updated parsing to use a parseAttribute function (reduced duplicated code).  Added __iter__, __next__, __contains__, __getitem__.