c# - JIRA XML Export contains HTML characters -
i trying parse xml export jira. example: https://jira.atlassian.com/si/jira.issueviews:issue-xml/demo-4778/demo-4778.xml when open in browser , right click -> save -> xml expected. when try use c# content there problem nodes this:
<description> <p>go browser <br/> open application<br/> log in page <br/> click on categories button<br/> click on add button <br/> not able add category on categories table <br/> given me error message </p> </description>
the problem contain html characters inside , not converted in c# world characters. example: <br/>
escaped & lt;br/& gt; instead of being treated newline. problem doesn't exist when download browser , load file, difference?
this code:
webrequest request = webrequest.createhttp("https://jira.atlassian.com/si/jira.issueviews:issue-xml/demo-4778/demo-4778.xml"); using (webresponse response = request.getresponse()) { using (stream stream = response.getresponsestream()) { using (streamreader objreader = new streamreader(stream)) { var serializer = new xmlserializer(typeof(rss)); var rss =(rss)serializer.deserialize(objreader); var desc = rss.channel.item.description.text[0]; } } }
and desc variable content:
<p>go browser <br/> open application<br/> log in page <br/> click on categories button<br/> click on add button <br/> not able add category on categories table <br/> given me error message </p>
and why jira exports contain html tags inside text? guess doing getting webpage instead of it's content. done behind scenes of "save xml" in browser?
Comments
Post a Comment