Ah, okay. See your XPath? you are going all the way back to the root of your XML, I bet. And your function? Is @class the repeating field? if so, you should be able to just use eventObj.Site.NewValue.text to get the current value.
If, for example, 'control' were your repeating group, and you had an OnAfterChange event attached to it, you would use eventObj.Site.selectSingleNode("@class") to get the correct class attribute for each instance of the control node when it changes... does that make sense?