is it possible to get all attributes for a particular node in pyqt ?
for example .. consider for following node:
< asset Name="3dAsset" ID="5"/>
i want to retrieve the (“Name” and “ID”) strings
is it possible?
thanks in advance
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.
You can retrieve the particular value of the attribute using the function,
To get all the attributes use,
and you have to traverse through the DomNamedNodeMap and get the value of each of the attributes. Hope it helps.
Edit : Try this one.
With the QDomNamedNodeMap you are having give,
which will return a QDomNode for the particular attribute.
Then give,
With the QDomAttr obtained give,
which will return the name of the attribute.
Hope it helps.