XML longest sum frequency