Just 2 additional points, firstly how can i urldecode the values within the elements (i found that doing it prior to building the query caused an error as one of the blocks in the code is html), i could remove these blocks as i don't need them is that possible? and secondly my xml file has some unique elements at the end, how do i access these?

e.g

<xml>
<item>
{various elements}
</item>
<item>
{various elements}
</item>
... {lots of item blocks} ...
<item>
{various elements}
</item>
<user_id>202342</user_id>
<user_name>megalith</user_name>
</xml>

how do i get the contents of user_id and user_name?

I tried Dim user_id As String = element.<user_id>.Value but it returns null