vendredi 20 février 2015

how to get few lines from xml in python


Vote count:

0




i have the below XML file and i want to all the lines between the tags and . how do i do it with python?



<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<nf:edit-config>
<nf:target>
<nf:running/>
</nf:target>
<nf:config>
<m:configure>
<interface>
<__XML__PARAM__interface>
<__XML__value>Ethernet1/1</__XML__value>
<m1:no>
<m1:shutdown/>
</m1:no>
<m2:description>
<m2:__XML__PARAM__desc_line>
<m2:__XML__value>ani</m2:__XML__value>
</m2:__XML__PARAM__desc_line>
</m2:description>
</__XML__PARAM__interface>
</interface>
</m:configure>
</nf:config>
</nf:edit-config>
</nf:rpc>
]]>]]>


asked 22 secs ago







how to get few lines from xml in python

Aucun commentaire:

Enregistrer un commentaire