First question: is there any way to get the name of a node's attributes?

<node attribute1="value1" attribute2="value2" />

Second question: is there a way to get attributes and values as value pairs? The situation is the following:

<node attribute1="10" attribute2="0" />

I want to get all attributes where value>0 and this way: "attribute1=10".

Edit
Report