dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: extracting a URL from xml and loading into flash?

  1. #1
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338

    extracting a URL from xml and loading into flash?

    Hey all,

    1) is there a way to access href using the attributes tag (or some other way of accessing the url)?

    2) if not is there a way to replace the " around the tag with ' ?


    Code:
    <a href="hw3.php?config=&amp;pass=&amp;dpp=&amp;forecast=zandh&amp;config=&amp;place=victoria&amp;state=il&amp;country=us">		 Victoria, Illinois</a>
    I'm trying to extract the url from a remote xml and have hit a stumbling point.. thanks for any feedback

    Ryan
    Evolve Designs Interactive Media
    the natural selection

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    here's the page im pulling the xml from... never had to work with xml with so much html...

    http://www.rssweather.com/hw3.php?pa...oria&submit=GO

    ps sry for the double post.. the edit button isn't there again!
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    That page is an html page...meaning if I view it's source I can find this with a search(part of the string you say you need):

    a href="hw3.php?


    Now...if I pull up an actual RSS feed from that site(which IS XML) you will see you will not find that string above. In an RSS feed I would simply need to target a <link> node.

    What you want to do has nothing to do with XML.

  4. #4
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    hmm not sure what you mean? I was able to parse down to the href I was looking for and now it works fine.
    (locationXML.firstChild.childNodes[1].childNodes[4].childNodes[2].childNodes[0].firstChild.attributes.href

    Note the first line when you view source:

    <?xml version="1.0" encoding="UTF-8"?>

    Can you send me a link to the rss feed to that search page? I couldn't find one.
    Last edited by EvolveDesigns; 04-05-2007 at 02:44 PM.
    Evolve Designs Interactive Media
    the natural selection

  5. #5
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    Evolve Designs Interactive Media
    the natural selection

  6. #6

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