implement Xml method