I would say that the child should be saved. Being a child means still young to save himself and can get easily confused especially on such fire outbreak situation.
While the spouse is old enough to save himself or has the capabilities to even save others. It is since in this question, it is not specifically mentioned the exact situation of the child and the spouse. Like who is the one who is in immediate danger, who can be saved the fastest, who is not capable of saving himself and who is most likely to survive the accident.
Also I do not believe that a child can be replaced or any other person. Everyone is unique.