Original: Even though he took the children of Sopron's nobility with him as hostages, the city opened its gates when the armies of King Ladislaus IV of Hungary arrived.
Simplified: But the people of the city opened the gates when the army of King Ladislaus IV of Hungary arrived.