extractXml should traverse tree separately