Fixing NULL pointer exception issues with the web.xml  parser.

Hi guys, I had a couple of problems with the web.xml parser when using a custom web.xml file. Here are the fixes I made to get around those problems.

1. Issue with totalElements variable being used to limit a loop and subsequently being reset inside it

2. Issue with checking for == null on xml search for child elements, needed to check for > 0 length