I have an untyped XML column in Sql Server Database which holds values such as 

```
 1
 <root><a>123</a></root>
 <root>23d</root>
 23

```

I was trying with the following query 

```
declare @x xml
set @x='1'
select @x.exist('xs:int(.)')

```

But here the problem is exist function will return 1 even if `@x='<root><a>12</a></root>'`

I would like the output to '0' in such cases.

Is there a way out?