I've some XML which i need to show in a div as text.
Can we convert this XML to format like below.
<root>
<field>
<label>Have you invested before</label>
<value>No</value>
</field>
<field>
<label>Are you looking to invest in the next 6 months</label>
<value>Maybe</value>
</field>
<field>
<label>What investments are you interested in</label>
<value>Carbon Credits, Green Investments</value>
</field>
<field>
<label>How much are you looking to invest</label>
<value>£50,000 - £100,000</value>
</field>
</root>
Output should be like as below:
Have you invested before : No
Are you looking to Invest in the next 6 months : Maybe
What Investments are you interested in : Carbon Credits,Green Investments
How much are you looking to invest : £50,000 - £100,000
Is this possible using Jquery/javascript.??
And it should be rendering like below HTML.
<div class="how-to">
<div class="how-text">
<h3>Your Requirements</h3>
<ul class="requirements">
<li><label class="field-l">Have you invested before:</label> <span>No</span></li>
<li><label class="field-l">Are you looking to Invest in the next 6 months:
</label> <span>Maybe</span></li>
<li><label class="field-l">What Investments are you interested in:</label>
<span>Carbon Credits,Green Investments</span></li>
<li><label class="field-l">How much are you looking to invest:</label>
<span>£50,000 - £100,000</span></li>
<li class="link-pad"><a href="index.html" class="requirements">
Change your requirements</a></li>
</ul>
<div class="clear"></div>
</div>
</div>