+1  A: 

You could alias @@rowcount to '@id', like:

declare @t table (name varchar(25))

insert @t (name) values ('jddjdjd')

select  @@rowcount as '@id'
,       name
from    @t
for xml path('row'), root('rows')

This prints:

<rows>
    <row id="1">
        <name>jddjdjd</name>
    </row>
</rows>

However, I'm not sure it's clearly defined what @@rowcount means at the point where it gets turned into an attribute.

Andomar
Hey thanks!! wow that was really a DOH!! moment on my side.. I forgot you can simply add an alias in the form of xxx as "@id" to create the attribute.
David S
Sorry in addition... as for the @@rowcount, it was needed just to provide a sequence - I am using www.dhtmlx.com data grids and it needs some sort of unique sequence for each row.. obviously in this case I just needed a running sequence, however of course a record id etc could be used.. many thanks again for responding, very appreciated.
David S