Support new format of internal list and xml.

Please review.