Make git like graph from XML with javascript