When saving the XML string as a file, I get a wrong output XML with special characters. The "<" and ">" tags are replace with < and > respectively.
XML String:
<string xmlns="http://smartpark.com/">
<DocumentElement>
<SpaceInfo>
<R_Numb>490</R_Numb>
<FirstName>Michael</FirstName>
<LastName>Jones</LastName>
<Unit>311</Unit>
<Type>RG</Type>
<Location>FLOOR 1</Location>
<Feature>C</Feature>
<Space>100</Space>
<Status>Assigned</Status>
<DateAssigned>2014-09-24T00:00:00-05:00</DateAssigned>
</SpaceInfo>
</DocumentElement>
</string>
Saving Method:
System.IO.File.WriteAllText(Server.MapPath("testing.xml"), urlText,Encoding.UTF8);
 
No comments:
Post a Comment