You can use perl for this, lets say these are your files
$ ls xml/*.xml xml/1312537177.xml xml/1312537179.xml xml/1312537182.xml
and this is the content
$ cat xml/*.xml <?xml version="1.0" encoding="UTF-8" ?> <somenode><userid>1312537177</userid><otherstuff>fsadfadsf</otherstuff></somenode> <?xml version="1.0" encoding="UTF-8" ?> <somenode><userid>1312537179</userid><otherstuff>fsadfadsf</otherstuff></somenode> <?xml version="1.0" encoding="UTF-8" ?> <somenode><userid>1312537182</userid><otherstuff>fsadfadsf</otherstuff></somenode>
using this simple bash command
$ for i in $(ls xml/*.xml); do cat $i | perl -M'XML::Bare' -e "local( $/ ); print ( (new XML::Bare(text => <STDIN> ))->parse()->{'somenode'}{'userid'}{'value'});print \"\n\""; done; 1312537177 1312537179 1312537182
you can get the contents of the userid node.
Of course you need to change the command to fit your xml structure.
Note that you might need to install the XML::Bare perl module if it's not already installed in your machine. If the structure of your xml is not fixed you can use the find_node function http://metacpan.org/pod/XML::Bare. (I have perl v5.10.1 installed)
Hope this helps