function SordByDate in NewsRepository for sorting xml elements