Sorry for joining this conversation late...
Is there something missing in the code when you are setting the XML variable:
declare @xmlvar1 xml;
declare @emp table (emp_id int primary key);
set @xmlvar1 = '
insert into @emp(emp_id)
select T1.lst.value('.','int') as emp_id
FROM @xmlvar1.nodes('/emp/id') T1(lst);
select * from @emp;
It doesn't look like XML, and when I try to run this I'm not getting the expected results.