Get Add-on ID in XML

Could anyone tell me if there is a way to get the ADD-ON ID in XML without the need to hardcore the id? I was not able to find anything but I am basically looking for the equivalent of this.

xbmcaddon.Addon().getAddonInfo(‘id’))