To read the XML file we have used awk script to extract the package name from an xml file and print out in CSV format. The reason for choosing to use awk is that we can deal with the xml files inside the same NSH script that generates them.
can you post the awk you use ?
also - if you do the request w/ wget or perl you can specify the output format as json if that's any easier for you to parse like:
curl -k -i -H "Accept:application/json" -X GET "YOUR_REQUEST_URL&format=application/json"