Added get-attribute generic method for tags and documents.