Skip to content

Operational command result #479

Answered by BatD2
kirillmuravyev asked this question in Q&A
Discussion options

You must be logged in to vote

Your response is correct. element_response.items() will return the attributes of the root element. You can navigate element tags using ElementTree methods, for example:

element_response.find('./result/system/hostname').text

To view the full xml response, you can use dump() or tostring():

ET.dump(element_response)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kirillmuravyev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants