Complex sentence: The chief commander in Kiev was voivode Dmytro, while Danyla of Halych was in Hungary at that time, seeking a military union to prevent invasion.
Split into simpler sentences: The chief commander in Kiev was Dmitr, "voivode" of Danyla of Halych. Danyla at that time was in Hungary seeking a military union to prevent invasion.