xml string to webpage

zhanlang13

New Member
I am new C#, I was wondering what the best way would be to display xml string on a asp.net webpage, I tried putting onto a textbox.. but it is not formatted.. is there any way I can make it look formatted. I am getting this XML as a response to a web service so dont know what the structure of xml would be like to read node by node as my xml has come custom elements. this xml is used by users in their projects so formatting is important.. can someone help me with this.. the sample xml file might be like this\[code\]<geonames> <totalResultsCount>1</totalResultsCount> <code><postalcode>90210</postalcode> <name>Beverly Hills</name> <countryCode>US</countryCode> <lat>34.09011</lat> <lng>-118.40648</lng> <adminCode1>CA</adminCode1> <adminName1>California</adminName1> <adminCode2>037</adminCode2> <adminName2>Los Angeles</adminName2> <adminCode3/>testing123<adminName3/> </code> </geonames>\[/code\]thanks in advance,PS: Let me know if i have make the question more specific or make it more clear.
 
Back
Top