reading a messy xml feed
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: reading a messy xml feed

  1. #1
    Member
    Join Date
    Apr 2014
    Posts
    38

    reading a messy xml feed

    Here is the generated xml feed:

    code:


    amp;utm_campaign=2cc3e165-my_google_analytics_key&utm_campaign=2c9ee165-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&utm_campaign=2cc39ee16 5-my_google_analytics_key&type=1&type=1& type=1&type=1&type=1&type=1&utm_so urce=Test&utm_source=Test&utm_source=Test& amp;utm_source=Test&utm_source=Test&utm_so urce=Test&utm_source=Test&utm_source=Test& amp;utm_source=Test&utm_source=Test&id=229 1374&id=229377&id=229380&id=229183&amp ;id=229386&id=221389&utm_medium=email" type="array">
    <clicks type="integer">1</clicks>
    <unique type="integer">1</unique>
    </struct>
    <struct key="http://ctt.marketwire.com/?release=954477&amp;utm_medium=email" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://ctt.marketwire.com/?release=954477&amp;utm_medium=email" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://ctt.marketwire.com/?release=954477&amp;utm_medium=email" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://ctt.marketwire.com/?release=954477&amp;utm_medium=email" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://ctt.marketwire.com/?release=954477&amp;utm_medium=email" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://ctt.marketwire.com/?release=954477&amp;utm_medium=email" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://www2.marketwire.com/mw/emailprcntct?id=912D3CDA23430CF5&amp;utm_medium=em ail" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://www2.marketwire.com/mw/emailprcntct?id=859CA73C1FE04D61&amp;utm_medium=em ail" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://www2.marketwire.com/mw/emailprcntct?id=EAF9695E4909A5C4&amp;utm_medium=em ail" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    <struct key="http://www.intlminerals.com/?utm_source=Test&amp;utm_medium=email" type="array">
    <clicks type="integer">0</clicks>
    <unique type="integer">0</unique>
    </struct>
    </MCAPI>&amp;url=http://www.intlminerals.com/investors/financial-reports&amp;url=http://www.sedar.com/&amp;url=http://www.sedar.com/&amp;url=http://www.intlminerals.com/investors/financial-reports&amp;url=http://www.intlminerals.com/investors/financial-reports&amp;url=http://www.intlminerals.com/investors/financial-reports&<MCAPI type="array">
    <struct key="http://www.sandmanmedia.com/mailchimp/approved/approve.php?token=cJP7KEGJjXPaaShaFHfjWVbNRFlD1e73 NM1b4lKe8ce8Vm8dTdmFYA5GThWKlUEZkj1eHCiFEAEcMCgjGF OiTKPCSB049iUjELAZ0JiiXMlA2EKmXbHGM9WhBMcAUWJc



    Because the feed is not clean my script will not read it. If I use a clean xml feed then my script works. Anyone have any suggestions on what options I have if I wanted to read the above feed? Every time I call this feed the extra info in the start and end come out different each time

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    117
    What do you call messy ??? what is the XML when it works ??? Looks strange to me anyway!
    why would you need a (type of Integer / Array) within an XML file ??? I work with XML files which
    have 100x the information and they work at all times and these get Read, Written or RE-Written each time!
    regards aktell

  3. #3
    Member
    Join Date
    Apr 2014
    Posts
    38
    This is what mailchimp is pushing out to me when I call for information from my mailchimp account using their API. I see the stats showing are correct in this xml data but I don't know how I can now pull it into my flash document due to the feed coming out like the above.

  4. #4
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    117
    Hi again,
    Sounds complicated! maybe you do have to read the appropriated data useful to yourself out, and with that re-write that data to a new separate
    XML file which you could use easily in your Application ??? One way of approaching it! regards aktell

  5. #5
    Member
    Join Date
    Apr 2014
    Posts
    38
    thats what my question is. how is it done since scritps for reading are not working due to the feed being how it is

  6. #6
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    117
    I would read the results of the messy XML into invisible Inputbox /textboxes, and use that info to write a new XML file in a way you would like it to be with the XML tags you specify, and read into whatever you
    wanted it to be visible in! You did not mention if you are working in FLASH or Flash / FLEX so that is of course slightly different. regards aktell

  7. #7
    Member
    Join Date
    Apr 2014
    Posts
    38
    I'm in flash cs 5.5 using AS3. when i write to my input box then I'm guessing I create a variable to store that info into. Although how to I specific a piece of the xml code that's written to the input box as I've done countless searches with no luck on that.

  8. #8
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    117
    Maybe this will help you as I did give a helping hand a week or so ago to somebody else!

    http://stackoverflow.com/questions/2...23212_25376985

  9. #9
    Member
    Join Date
    Apr 2014
    Posts
    38
    this is not helpful ....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com