Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

how to get the HTML content from the XML for Rational Requirement Management

Folllowing is the XML that i got for a particular requirement .It contains HTML contents in it how can i parse that content alone or is there any url that i can query to get that contents.
 <rdf:RDF>
<rdf:Description rdf:nodeID="A0">
<rdf:subject rdf:resource="https://jazz.server.com:9443/rm/resources/_079aa91ed9314005ac1b0f7c451bbc35"/>
<rdf:predicate rdf:resource="http://open-services.net/ns/rm#validatedBy"/>
<rdf:object rdf:resource="https://jazz.server.com:9443/qm/oslc_qm/contexts/_nwh1YAlnEeORwL1iXkSqrw/resources/com.ibm.rqm.planning.VersionedTestCase/_DVeGMAlqEeORwL1iXkSqrw"/>
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<dc:title>Verify dividend transfer frequency</dc:title>
</rdf:Description>
<rdf:Description rdf:nodeID="A1">
<rdf:subject rdf:resource="https://jazz.server.com:9443/rm/resources/_079aa91ed9314005ac1b0f7c451bbc35"/>
<rdf:predicate rdf:resource="http://open-services.net/ns/rm#implementedBy"/>
<rdf:object rdf:resource="https://jazz.server.com:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/55"/>
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<dc:title>Frequency of dividend transfer</dc:title>
</rdf:Description>
<rdf:Description rdf:about="https://jazz.server.com:9443/rm/resources/_079aa91ed9314005ac1b0f7c451bbc35">
<rm_property:_kpGxcQlnEeOYRLW4UQ3HEg rdf:resource="https://jazz.server.com:9443/rm/resources/_e6f7908e4fb445cf859ca3d6d8cdf7a2"/>
<dc:title rdf:parseType="Literal">Frequency of dividend transfer</dc:title>
<dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-08-20T07:14:47.684Z</dc:created>
<oslc_rm:validatedBy rdf:resource="https://jazz.server.com:9443/qm/oslc_qm/contexts/_nwh1YAlnEeORwL1iXkSqrw/resources/com.ibm.rqm.planning.VersionedTestCase/_DVeGMAlqEeORwL1iXkSqrw"/>
<rm_property:_kyD5IQlnEeOYRLW4UQ3HEg rdf:resource="https://jazz.server.com:9443/rm/types/_ktHuwQlnEeOYRLW4UQ3HEg#Text"/>
<rdf:type rdf:resource="http://jazz.net/ns/rm#Text"/>
<dc:creator rdf:resource="https://jazz.server.com:9443/jts/users/netspurt123"/>
<rm_property:_1YGeUwlnEeOYRLW4UQ3HEg rdf:resource="https://jazz.server.com:9443/rm/types/_1B92QglnEeOYRLW4UQ3HEg#dd84ed1c-9786-469b-85a2-517388d6a09b"/>
<oslc:instanceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1xAtkQlnEeOYRLW4UQ3HEg"/>
<rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<rm_property:_1aPzYQlnEeOYRLW4UQ3HEg rdf:resource="https://jazz.server.com:9443/rm/types/_1CqZ0QlnEeOYRLW4UQ3HEg#19aa6f0b-dc4a-4a9b-8769-fe4873c3bf89"/>
<dc:contributor rdf:resource="https://jazz.server.com:9443/jts/users/netspurt123"/>
<oslc_rm:implementedBy rdf:resource="https://jazz.server.com:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/55"/>
<acp:accessControl rdf:resource="https://jazz.server.com:9443/rm/accessControl/_jMaJ8AlnEeOYRLW4UQ3HEg"/>
<dc:description rdf:parseType="Literal"/>
<jazz_rm:primaryText rdf:parseType="Literal">
<div>
<p id="_1283286295984"> A donor can choose the following frequencies:</p>
<ul id="_1283286295990">
<li id="_1283286295991">
<p id="_1283286295985">
- This is what is supported in the first release
</p>
</li>
<li id="_1283286295992">
<p id="_1283286295986"> Schedule a regular payment</p>
</li>
<li id="_1283286295993">
<p id="_1283286295987"> Monthly</p>
</li>
<li id="_1283286295994">
<p id="_1283286295988"> Quarterly</p>
</li>
<li id="_1283286295995">
<p id="_1283286295989"> Annual</p>
</li>
</ul>
</div>
</jazz_rm:primaryText>
<rm_property:_1UNc0QlnEeOYRLW4UQ3HEg rdf:resource="https://jazz.server.com:9443/rm/types/_1CqZ0QlnEeOYRLW4UQ3HEg#4629eb0b-487a-4d25-80aa-845e5c48a493"/>
<rm_property:_1VOJcQlnEeOYRLW4UQ3HEg rdf:resource="https://jazz.server.com:9443/rm/types/_1GYcMglnEeOYRLW4UQ3HEg#2db75d1c-62ad-47d1-86dc-90f31cf33044"/>
<dc:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-08-20T07:14:47.684Z</dc:modified>
<nav:parent rdf:resource="https://jazz.server.com:9443/rm/folders/_CNqbhQloEeOYRLW4UQ3HEg"/>
<oslc:serviceProvider rdf:resource="https://jazz.server.com:9443/rm/discovery/_jMaJ8AlnEeOYRLW4UQ3HEg/services.xml"/>
<dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">309</dc:identifier>
</rdf:Description>
</rdf:RDF>

0 votes

Comments

From that data, the node <jazz_rm:primaryText rdf:parseType="Literal"> is a good place to look for the primary text of a text artifact.

 how can i get only the text content from HTML inside XML



One answer

Permanent link
Here's a little secret you can use at our own risk...
When you are viewing an artifact, the url will contain this:
/rm/web#action=com.ibm.rdm.web.pages.showArtifact

If you change it to the following, you enable an extra feature at edit time:
/rm/web?debug=true#action=com.ibm.rdm.web.pages.showArtifact

Now when you press edit, there will be a "Source" button on the left side of the editor toolbar. Pressing this will switch you into a source view mode that shows your content as the raw HTML, and in fact, you can make direct HTML changes there.

*But be warned*, if you mess up the HTML, you are on your own!
The source pane doesn't really size to match the browser, but if all you want to do is see/copy the HTML, that's the easiest way to do it.

1 vote

Comments

  how can i get only the text content from HTML inside XML

Can you clarify exactly what it is you need to accomplish because the question seems to have changed. If you just want the text, then why not simply select it and use copy/paste while viewing the artifact?

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 31
× 16

Question asked: Aug 30 '13, 2:38 a.m.

Question was seen: 4,639 times

Last updated: Sep 02 '13, 11:40 a.m.

Confirmation Cancel Confirm