<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/14/2014 03:33 PM, Shu Ming wrote:<br>
</div>
<blockquote cite="mid:52D4E82D.7020205@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">I think it is nice to use a generic
lxml library to generate XML documents. About the existing XML
documents generation like vmTemplate._get_cdrom_xml(),
networkxml.to_network_xml() &etc, do you have plane to
convert them to use lxml library?<br>
</div>
</blockquote>
not plane. will refactor these old code later.<br>
<br>
I just use it in new my new patch. <br>
<br>
You can refactor these old code with lxml. <br>
<br>
<blockquote cite="mid:52D4E82D.7020205@linux.vnet.ibm.com"
type="cite">
<div class="moz-cite-prefix"> 2014/1/14 12:57, Sheldon:<br>
</div>
<blockquote cite="mid:52D4C3A9.80007@linux.vnet.ibm.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
As we all know there is a issue about generate and manipulate
XML documents<br>
<b><a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/kimchi-project/kimchi/issues/124">https://github.com/kimchi-project/kimchi/issues/124</a></b><br>
<br>
IMO, lxml is a good choice.<br>
you can see this patch:<br>
$ git show 69edfe9<br>
Mark use it to generate XML documents.<br>
<br>
And for manipulate XML documents, here is a example. <br>
<font color="#909090"><font size="3"><i><font color="#000000">$
ipython -c 'from lxml import objectify <br>
root = objectify.fromstring("<root><a
k=\"key\">24.12.2000<b>12.24.2000</b></a></root>")
<br>
print root.a <br>
print root.a.b <br>
print root.a.get("k") <br>
' </font></i><br>
<br>
<font color="#000000"><i>re</i><i>sult</i><i>: </i><i><br>
</i><i>24.12.2000 </i><i><br>
</i><i>12.24.2000 </i><i><br>
</i><i>key </i></font></font></font><br>
<br>
more info: <a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://lxml.de/">http://lxml.de/</a><br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</blockquote>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</body>
</html>