Question On generating XML Code

Hi, I need to know can I get the xml code for the particular node in bpm diagram?Eg I need to get xml code only for user task node from the bpm diagram