added htttps and some code optimization in xml