I trying to parse this xml string :
<form name="generatedForm" role="form"> <div class="form-group"> <label for="result"> Calculation Result </label> <input class="form-control" name="result" cam-variable-type="Long" cam-variable-name="result" type="text" /> <div ng-if="this.generatedForm.result.$invalid && this.generatedForm.result.$dirty" class="has-error"> <div ng-show="this.generatedForm.result.$error.required" class="help-block"> Required field </div> <div ng-show="this.generatedForm.result.$error.camVariableType" class="help-block"> Only a long value is allowed </div> </div> </div> <div class="form-group"> <label for="correcto"> es correcto? </label> <input class="form-control" name="correcto" cam-business-key type="checkbox" /> <div ng-if="this.generatedForm.correcto.$invalid && this.generatedForm.correcto.$dirty" class="has-error"> <div ng-show="this.generatedForm.correcto.$error.required" class="help-block"> Required field </div> <div ng-show="this.generatedForm.correcto.$error.camVariableType" class="help-block"> Only a boolean value is allowed </div> </div> </div></form>
The code what I'm using is :
var x =XDocument.Parse("XmlString");
But i recieving System.Xml.XmlException: 'An error occurred while parsing EntityName. Line 1, position 290.'
I tried changig the encoding but the result is the same.
Thanks in advance.