[jQuery] Attributes Solution for page DOM elements

[jQuery] Attributes Solution for page DOM elements


Here is the code I created...
sosForm2.prototype.getAttributes = function (myForm) {
    var attributeList = "";
    if(myForm.attributes) {
        myAttributes = myForm.attributes;
    } else {
        myAttributes = myForm[0].attributes;
    }
    for(var iA = 0;iA<myAttributes.length;++iA){
        attributeList =
jQuery.ListAppend(attributeList,myAttributes[iA].nodeName);
    }
    return attributeList;
}
Obviously this is part of my plugin at the moment... but is this
functionality in jQuery already?
NOTE: My goal was to pull namespace type attributes from elements.
This helps facilitate that.
<form id="testForm2" sosform:validate="true" action="index.htm"
name="test2">