I know this way will be easier.
But I'm afraid when this format is changed, we have to maintain it for every test module.
So I advise to use libvirt_xml module as possible. ;-)
And I believe you will find that way is very simple too(all we need is adding something code for analysing xml)~~