How can i extract the value of name4 from the following? the example provided is a sample ? how can i do the same with xml.parsers.expat, i am using python 2.4 that doesnt have xml.etree
<test name1="" name2="" name3="0.0.0.0" name4="Linux">
</test>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sometimes it’s really easy to use BeautifulSoup
Also you can find more examples on documentation page
Update how to change name of attribute and print whole xml: