Command help

Greetings all.
I am looking for a command to scan man .xml files and of those files i want to print the data on the screen and of that data i would like to only see certain data. below is the example that i have tried

grep -i stagingport= /vhosts/*/sys/active-config.xml | grep 80 | grep -v apache22

/vhosts/dw13343/sys/active-config.xml: <apache port='801' stagingport='80'>
/vhosts/dw13562/sys/active-config.xml: <apache port='801' stagingport='80'>
/vhosts/dw13632/sys/active-config.xml: <apache port='801' stagingport='80'>
/vhosts/dw13746/sys/active-config.xml: <apache port='801' stagingport='80'>

from that data i would only like to see certain info
I would like to see the dwxxxxx and the stagingport=80

how could i do that?

Thanks

Difficult with grep , easy with e.g. sed :

sed -rn 's#^/[^/]*/([^/]*)/.* (stagingport=.{4}).*$#\1 \2#p' file
dw13343 stagingport='80'
dw13562 stagingport='80'
dw13632 stagingport='80'
dw13746 stagingport='80'

thanks i will give it a try.

SDC