<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Kumar <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">could you send me a snippet of the code
you you used for parsing ? <br>
</div>
<div class="moz-cite-prefix">You can also post the issue directly
in the issue of the repository. Disappointingly nobody has used
that section yet <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">As a general answer parsing the xml
file with python is very simple. You don't even need qeschema,
the xmlschema package is sufficient, even if in that case you need
to download the schema file by yourself, its location is printed
in the header of the xml file.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">For example if you <br>
</div>
<div class="moz-cite-prefix">current url for example is <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><a class="moz-txt-link-freetext" href="http://www.quantum-espresso.org/ns/qes/qes_190304.xsd">http://www.quantum-espresso.org/ns/qes/qes_190304.xsd</a><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">To convert the whole output of QE in a
python dictionay the python lines are something like: <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><tt>import xmlschema</tt></div>
<div class="moz-cite-prefix"><tt>from xml.etree import ElementTree </tt><tt><br>
</tt></div>
<div class="moz-cite-prefix"><tt><br>
</tt></div>
<div class="moz-cite-prefix"><tt>schema =
xmlschema.XMLSCHEMA('qes_190304.xsd')</tt></div>
<div class="moz-cite-prefix"><tt>data =
ElementTree.parse('prefix.save//data-file-schema.xml').getroot()
</tt><tt><br>
</tt></div>
<div class="moz-cite-prefix"><tt>data_dict = schema.to_dict(data) </tt><tt><br>
</tt></div>
<div class="moz-cite-prefix"><tt><br>
</tt></div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 11/12/19 4:07 AM, Sonu Kumar wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHePdfC+dABS9r-nBKC=p+2phy3rVhKRO-+AGpMag8AE7UB8Cg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div style="font-size:small" class="gmail_default">Dear QE
users,</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
<div style="font-size:small" class="gmail_default">Is there any
xml parser for data-file-schema.xml in "prefix".save directory
of tmp directory?</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
<div style="font-size:small" class="gmail_default">I found
qeschema (<a href="https://github.com/QEF/qeschema"
moz-do-not-send="true">https://github.com/QEF/qeschema</a>),
but stuck by the attribute errors of the object
XsdConstraintXPathParser (AttributeError: type object
'XsdConstraintXPathParser' has no attribute 'end')<br>
</div>
<div style="font-size:small" class="gmail_default">Any
suggestions for xml parser or the error would be appreciated.</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
<div style="font-size:small" class="gmail_default">best regards,</div>
<div style="font-size:small" class="gmail_default">Kumar<br>
</div>
<div class="gmail_default" style="font-size:small"><br
clear="all">
</div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><span
style="color:rgb(56,118,29)"><b><span
style="background-color:rgb(243,243,243)"></span></b></span>
<div><span style="color:rgb(56,118,29)"><b><span
style="background-color:rgb(243,243,243)">With kind regards,<span></span><br>
</span></b></span></div>
<div><span style="color:rgb(56,118,29)"><b><span
style="background-color:rgb(243,243,243)">S Kumar | PhD.<span
class="gmail_default"
style="font-size:small"></span><br>
</span></b></span></div>
<span style="color:rgb(56,118,29)"><b><span
style="background-color:rgb(243,243,243)"></span></b></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Quantum ESPRESSO is supported by MaX (<a class="moz-txt-link-abbreviated" href="http://www.max-centre.eu/quantum-espresso">www.max-centre.eu/quantum-espresso</a>)
users mailing list <a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
</blockquote>
<p><br>
</p>
</body>
</html>