There are two types of elements that you're adding, and as such there are two methods to use.
To add a new child node to the XML, you would use message.addChild(). The addChid() function will add a new child node below the node specified. This is used to add complete nodes, but not used to add attributes.
To add an attribute, you will use message.setNode(). The setNode() function is used to create new items, as well as update existing items. When the item you're specifying (in this case, an XML attribute) does not exist, QIE will add that item.
Let's take a look at your XML:
<dataSets>
<dataset>
<selectField name="someValue"></selectField>
</dataset>
</dataSets>
Let's add a new child node below /dataSets/dataset, called selectField2, and give it the value of 'some data'.
message.addChild('/dataSets/dataset', 'selectField2', 'some data');
The resulting XML looks like this:
<dataSets>
<dataset>
<selectField name="someValue"></selectField>
<selectField2>some data</selectField2>
</dataset>
</dataSets>
Now we want to add an attribute to our newly added tag. We will use message.setNode() to do that, like this:
message.setNode('/dataSets/dataset/selectField2/@name', 'someValue2');
This results in this XML:
<dataSets>
<dataset>
<selectField name="someValue"></selectField>
<selectField2 name="someValue2">some data</selectField2>
</dataset>
</dataSets>