in reply to Why my code working...why my code is not working...

I am able to read patch_name,patch_id ,patch_desc but not target_version how ever these all are part of one tag. How can I debug this behavior?

As Tutorials Basic debugging checklist and brian's Guide to Solving Any Perl Problem say:

when you're not getting the values you're looking for, Dumper it

You can use   use Data::Dump;dd [ join "\n", $patch_node ];