Well, first of all attributes aren't considered "children" in XML's data model. But more to the point, the methods you are calling aren't looking for attributes correctly. Probably you're calling methods designed to get child nodes which are elements or text. But George has a point. DOM-bashing is tedious to write in the first place and tedious to change when requirements ...