emmetmurray
Programmer
Hi,
I need to flatten some xml, so that each element has only one tier after the root.
The current code is
- <event>
<event_token>MXJ</event_token>
<src_code>tptd</src_code>
<area_code>PAR</area_code>
<event_code>8441</event_code>
<venue_code>DIS/T</venue_code>
<country_code>fr</country_code>
<geographic_info>
<event_lattitude>48.87260000</event_lattitude>
<event_longitude>2.77170000</event_longitude>
</geographic_info>
<full_query>
<crypto_block>c_--bTWUoDG0GIgLYJ8muoe-UQ0YnVHRdRCDNJi8OhJ8svVB5QYbUuQe8vGHBShRH6yOQwrHzp N_APvUtz_L61fgJQvz3iDKMCyDC4cHb4CZmbs_GdEP-xN6zfSsCffUMvAu7GYnsP9Nnm2-Y</crypto_block>
</full_query>
</event>
I just need to get rid of the <geographic_info> and <full_query> tags, so that everything inside the <event> tag is only one level. So the out put should be:
- <event>
<event_token>MXJ</event_token>
<src_code>tptd</src_code>
<area_code>PAR</area_code>
<event_code>8441</event_code>
<venue_code>DIS/T</venue_code>
<country_code>fr</country_code>
<event_lattitude>48.87260000</event_lattitude>
<event_longitude>2.77170000</event_longitude>
<crypto_block>
c_--bTWUoDG0GIgLYJ8muoe-UQ0YnVHRdRCDNJi8OhJ8svVB5QYbUuQe8 vGHBShRH6yOQwrHzpN_APvUtz_L61fgJQvz3iDKMCyDC4cHb4C Zmbs_GdEP-xN6zfSsCffUMvAu7GYnsP9Nnm2-Y
</crypto_block>
</event>
I have very little knowledge of xslt and how to run the transformation, so any help at all would be greatful.
Thanks
I need to flatten some xml, so that each element has only one tier after the root.
The current code is
- <event>
<event_token>MXJ</event_token>
<src_code>tptd</src_code>
<area_code>PAR</area_code>
<event_code>8441</event_code>
<venue_code>DIS/T</venue_code>
<country_code>fr</country_code>
<geographic_info>
<event_lattitude>48.87260000</event_lattitude>
<event_longitude>2.77170000</event_longitude>
</geographic_info>
<full_query>
<crypto_block>c_--bTWUoDG0GIgLYJ8muoe-UQ0YnVHRdRCDNJi8OhJ8svVB5QYbUuQe8vGHBShRH6yOQwrHzp N_APvUtz_L61fgJQvz3iDKMCyDC4cHb4CZmbs_GdEP-xN6zfSsCffUMvAu7GYnsP9Nnm2-Y</crypto_block>
</full_query>
</event>
I just need to get rid of the <geographic_info> and <full_query> tags, so that everything inside the <event> tag is only one level. So the out put should be:
- <event>
<event_token>MXJ</event_token>
<src_code>tptd</src_code>
<area_code>PAR</area_code>
<event_code>8441</event_code>
<venue_code>DIS/T</venue_code>
<country_code>fr</country_code>
<event_lattitude>48.87260000</event_lattitude>
<event_longitude>2.77170000</event_longitude>
<crypto_block>
c_--bTWUoDG0GIgLYJ8muoe-UQ0YnVHRdRCDNJi8OhJ8svVB5QYbUuQe8 vGHBShRH6yOQwrHzpN_APvUtz_L61fgJQvz3iDKMCyDC4cHb4C Zmbs_GdEP-xN6zfSsCffUMvAu7GYnsP9Nnm2-Y
</crypto_block>
</event>
I have very little knowledge of xslt and how to run the transformation, so any help at all would be greatful.
Thanks