Alternative method of changing XML attribute?

My problem is simple:

[AS]var xml:XML = new XML(’<p class=“a”>Whatever</p>’);

xml.@class = ‘b’; // 1084: Syntax error: expecting identifier before class.[/AS]

Is there another way to change the attribute?

/ Frank