Note that there are some explanatory texts on larger screens.

plurals
  1. POExtracting XML data with ColdFusion
    primarykey
    data
    text
    <p>I'm trying to get a list of IDs to populate a few tables from <a href="http://cdn.easf.www.easports.com/fifa/football-club/static/wpp10legacy/plugin/futFifaUltimateTeamPlugin/assets/flash/xml/localization/messages.en_GB.xml" rel="nofollow">this XML file</a>. I've created the functions to do the database inserts in ColdFusion so I'm looking for a way to get the desired content from the XML file.</p> <p>I'm struggling with trying to get the specific content for each item type (Leagues, Nationalities) as the node names are 'weird' - certainly to me. For example I want to get the 2013 leagues which come under the nodes: </p> <pre><code> &lt;trans-unit resname="global.leagueabbr15.2013.league50"&gt; &lt;source&gt;SPL&lt;/source&gt; &lt;/trans-unit&gt; </code></pre> <p>where the "league50" is the ID I want and ("SPL") is the text value I want to store.</p> <p>How could I loop round each 2013.league to get the ID and source value?</p> <p><strong>(Update from comments)</strong></p> <p>I've had a look at XML search but the xml doesn't seem to be structured very well and so the I need to search after a certain part of the resname. (i.e. In the following xml I need to get the ID at the end -> <code>global.leagueabbr15.2013.league[ID]</code>. </p> <pre><code>&lt;trans-unit resname="global.leagueabbr15.2013.league1"&gt; &lt;source&gt;Superliga&lt;/source&gt; &lt;/trans-unit&gt; &lt;trans-unit resname="global.leagueabbr15.2013.league10"&gt; &lt;source&gt;Eredivisie&lt;/source&gt; &lt;/trans-unit&gt; &lt;trans-unit resname="global.leagueabbr15.2013.league13"&gt; &lt;source&gt;Barclays PL&lt;/source&gt; &lt;/trans-unit&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload