On Mon, Jun 4, 2012 at 4:49 PM, Chris Evich <cev...@redhat.com> wrote:
> All,
>
> I've got a need to port a bunch of libvirt tests that do a lot of xml
> manipulation.  Rather then just using xml.dom.minidom ad-hoc, I thought
> a medium-level utility module might be generally useful elsewhere too.
> Some examples to illustrate further:
>
> A class or set of functions that is mindful of structure but content naive:
>     + Attribute search, attribute search and replace, add/delete.
>     + Element search, attribute search and replace, add/delete.
>
> Another set that's value sensitive, but structure naive:
>     + Template & list based dict2xml and xml2dict
>     + others?
>
> I looked around our codebase, but it seems what little xml code exists,
> is ad-hoc.  Does the above sound generally useful?  If not, should I

It does, I like the idea of having an utility library to concentrate
operations with xml.

> confine it more toward virt in general, or keep it all libvirt specific?
>  Any ideas for other classes/functions you'd like to see?

Wrappers around the xml module that do work with py 2.4 and above, and
do the heavy lifting for stuff you have already mentioned:

 + Attribute search, attribute search and replace, add/delete.
 + Element search, attribute search and replace, add/delete.
 + Transform json/dict data to xml

-- 
Lucas
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to