Parse XML properly

Change-Id: I66a1eba80cb1068acd303766192e63f7254e0b46