Fixed Warnings:

XMLReader ProhibitDtd obsolete.
CodeDomProvider CreateGenerator obsolete.
Applied coding style to method which had CreateGenerator obsolete usage.