hi,
    When I use dom = virDomainDefineXML(conn, xml) to define xml, I countered a problem that " libvir: Domain Config error : internal error incorrect root element". Could you please tell me what's wrong with it?
    I tend to debug such problem above by gdb to step into virDomainDefineXML. When I press "step" in gdb, the console just shows the wrong messages, so I fail to access to the internal function of virDomainDefineXML. 
    My libvirt's version is 0.98 allowing debug with the command "CFLAGS = -g -O2" in libvirt's Makefile. I installed libvirt-bin by "sudo apt-get install libvirt-bin"in ubuntu. Is there something wrong in my installing steps? 

    Thanks a lot! 

    Best Regards,
    Corey