What rules, if any, govern how monsters with innate spellcasting such as dragons or Solars use spells with XP components? If a Solar casts Miracle, what resource is expended? Do they have some daily or weekly XP budget, or do they take negative levels after so many uses or something to that effect?

And for that matter, do NPCs in general have rules governing magic item creation and where they get the XP for that? I can't imagine every enchanter out there just happens to also be a mercenary adventurer going out and raiding dungeons all the time to keep up their business; and if they actually all are, I shudder to think of the ecological consequences for the monster species they must hunt.