virsh: add helpers for getting domain XML for XPath purposes
In virsh we quite often get the domain XML just to initialize the XPath parser so that we can extract information. Add helpers which will simplify this by wrapping the getting of the XML and parsing it along with error reporting. Additionally a second helper also gets the domain object from the parameters and releases it so that functions which need the XML as only source of data can be simplified further.
Showing
想要评论请 注册 或 登录