Hi you are on the right track.
First thing to try is replace ("\C:\\Temp\\Salary.xsn") with ("C:\\Temp\\Salary.xsn"). I am not sure if your path is incorrect but for me it works without the firs "\".
var getid = SalarySolution.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:personal/@id").text;
Yes this line is meant to get the value of the id field but I guess that just the xPath you are using is wrong. A nice way to get the correct xPath is using expression boxes. Drop an exBox to your form and point it to the datasource of your ID drop down list control and then check the "Advanced edit xPath" box to get the correct xPath. This you can then use your selectSingleNode function and i guess everything should work. Also try there to leave the first "/".
Let me know if it helped.