2 Replies Latest reply on Aug 18, 2014 5:28 AM by MW Design

    Reading a xml file and Extract content of xml tags

    alexmahone90

      Hi,

      I need a InDesign script to Extract content of xml tags by reading a local xml file. And stamping the content of xml on InDesign Text frame.

       

      My sample xml is as follows .

       

      <events type="array">

       

      <event>

       

       

      <aktiv_jn>J</aktiv_jn>

       

      <enetpulse_id>1712408</enetpulse_id>

      <event_id>65974</event_id>

      <hjemmehold>AZ Alkmaar</hjemmehold>

      <id>93</id>

      <kickoff>2014-08-17T12:30:00+01:00</kickoff>

      <land_id>140</land_id>

      <land_navn>Holland</land_navn>

      <liga_id>13684</liga_id>

      <liga_navn>Eredivisie</liga_navn>

      <livebetting_jn>J</livebetting_jn>

      <marked_id>2897740</marked_id>

      <marked_nummer>138</marked_nummer>

      <marked_tekst>AZ Alkmaar - Ajax</marked_tekst>

      <moderkamp_jn>J</moderkamp_jn>

      <ob_bet_type>MR</ob_bet_type>

      <odds_1>2.95</odds_1>

      <odds_2>2.25</odds_2>

      <odds_x>3.35</odds_x>

      <program_slut>2014-08-18T23:59:00+01:00</program_slut>

      <program_start>2014-08-15T00:00:00+01:00</program_start>

      <resultat>2</resultat>

      <spilstop_dato_tid>2014-08-17T12:30:00+01:00</spilstop_dato_tid>

      <sport_id>21</sport_id>

      <sport_navn>Fodbold</sport_navn>

      <taerskel nil="true"/>

      <udehold>Ajax</udehold>

      <udfald_1_id>9661951</udfald_1_id>

      <udfald_2_id>9661953</udfald_2_id>

      <udfald_x_id>9661952</udfald_x_id>

      </event>

      </events>


      And on my Indesign Page upon execution of script: I need text like,

      land_navn:     Holland

      odds_1:     2.95

       

      odds_2:     2.25

       

      odds_x:     3.35