Modularized XML function for Item.
Fixed merge conflicts.