Add methods asXML and count, and make the children method support namespaces