Bugfix: we would fail if the xml was compact

Change-Id: Ib92c5501156c631cf8694337e17498a39adc549b