base Xml logic