XML attributes as dictionary

While I can set an elements attributes using a dictionary I can’t find a way to do it the other way round.
someElem’s attributes will give me an array(list) like the example below

((NSArray) {(NSXMLNamedNode) font=“Arial”, (NSXMLNamedNode) fontSize=“53”, (NSXMLNamedNode) fontColor=“1 1 1 1”, (NSXMLNamedNode) bold=“0”, (NSXMLNamedNode) italic=“0”, (NSXMLNamedNode) alignment=“center”})

But where to go from there?

You could try something like this:

set theDict to current application's NSDictionary's dictionaryWithObjects:(theArray's valueForKey:"name") forKeys:(theArray's valueForKey:"objectValue")

Many Thanks Shane,

That one didn’t work but the one below :-):

set theDict to current application's NSDictionary's dictionaryWithObjects:(theArray's valueForKey:"objectValue") forKeys:(theArray's valueForKey:"name")

If only I had a dollar for every time I put keys before values :roll_eyes: