jeudi 21 août 2014

How to Parse JIRA Feed XML


Vote count:

0




I can get the Feed from JIRA which is in the XML Format.


Some of the Fields are in the Table Format. Is there any way to parse this Table formatted Fields.


This is the xml file which i received as JIRA Feed:



<!-- RSS generated by JIRA (6.2.3#6260-sha1:63ef1d6dac3f4db4c1effd408ccdc558) at Fri Aug 22 11:49:04 IST 2014 -->
<?xml-stylesheet href="http://localhost:8080/styles/jirarss2html.xsl" type="text/xsl"?><rss version="2.0">
<channel>
<title>Demo</title>
<link>http://localhost:8080/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=</link>
<description>An XML representation of a search request</description>'#$A'
<language>en-us</language>
<issue start="0" end="4" total="4"/>
<build-info>
<version>6.2.3</version>
<build-number>6260</build-number>
<build-date>15-04-2014</build-date>
</build-info>'#$A'
<item>
<title>[W-4] First Issue</title>
<link>http://localhost:8080/browse/W-4</link>'#$A'
<description>
&lt;style type=&quot;text/css&quot;&gt;'#$A#$A'.tableBorder, .grid'#$A'{'#$A' background-color: #fff;'#$A' width: 100%;'#$A' border-collapse: collapse;'#$A'}'#$A#$A'.tableBorder td, .grid td'#$A'{'#$A' vertical-align: top;'#$A' padding: 2px;'#$A' border: 1px solid #ccc;'#$A'}'#$A#$A'.noPadding'#$A'{'#$A' padding: 0 !important;'#$A'}'#$A#$A'h3 .subText'#$A'{'#$A' font-size: 60%;'#$A' font-weight: normal;'#$A'}'#$A#$A'.tabLabel'#$A'{'#$A' font-weight: bold;'#$A' border: 1px solid #ccc;'#$A' border-bottom:none;'#$A' padding: 2px;'#$A' display: inline;'#$A'}'#$A#$A'td.blank'#$A'{'#$A' padding: 0;'#$A' margin: 0;'#$A'}'#$A#$A'.blank td'#$A'{'#$A' border: none;'#$A'}'#$A#$A'#descriptionArea'#$A'{'#$A' margin: 0;'#$A' padding: 2px;'#$A' border: 1px solid #ccc;'#$A'}'#$A#$A'hr'#$A'{'#$A' border-top:1px solid #aaa;'#$A'}'#$A#$A'hr.fullcontent'#$A'{'#$A' height: 15px;'#$A' padding: 10px 0;'#$A' background: #fff url(&apos;http://localhost:8080/images/icons/hr.gif&apos;) no-repeat scroll center;'#$A'}'#$A#$A'&lt;/style&gt;'#$A' '#$A'&lt;table class=&quot;tableBorder&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt;'#$A'&lt;/style&gt
<table class="tableBorder" cellpadding="0" cellspacing="0" border="0" width="100%">'#$A' <tr>'#$A' <td bgcolor="#f0f0f0" width="100%" colspan="2" valign="top">'#$A' <h3 class="formtitle">
'#$A' [W-4]&nbsp;<a href="http://localhost:8080/browse/W-4">First Issue</a>'#$A'
<span class="subText">'#$A' Created: 22/Aug/14 &nbsp;Updated: 22/Aug/14'#$A#$A' </span>'#$A' </h3>'#$A' </td>'#$A' </tr>'#$A'
<tr>'#$A'
<td width="20%"><b>Status:</b></td>'#$A'
<td width="80%">To Do</td>'#$A' </tr>'#$A' <tr>'#$A' <td width="20%"><b>Project:</b></td>'#$A' <td width="80%"><a href="http://ift.tt/1pYOv9I">WO_Traffic</a></td>'#$A' </tr>'#$A#$A'
<tr>'#$A' <td><b>Component/s:</b></td>'#$A' <td>'#$A' None'#$A' </td>'#$A' </tr>'#$A' '#$A#$A' <tr>'#$A' <td><b>Affects Version/s:</b></td>'#$A' <td>'#$A' None'#$A' </td>'#$A'
</tr>'#$A' '#$A#$A' <tr>'#$A' <td><b>Fix Version/s:</b></td>'#$A' <td>'#$A' None'#$A' </td>'#$A' </tr>'#$A' '#$A' </table>
</description>

and so on...


In this i can able to get the Fields like 1. Title 2.link.


But After <Description> tag everything is like Html Table Format. Is there any way to parse this?



asked 28 secs ago







How to Parse JIRA Feed XML

Aucun commentaire:

Enregistrer un commentaire