Ok, so in my XML loaded function I have this:
private function loadedXML( e:Event ):void
{

var myXML:XML = new XML( e.target.data );
var yweather:Namespace = new Namespace( "
http://weather.yahooapis.com/ns/rss/1.0"; );
trace( myXML.channel.item.yweather::conditi...@temp );

}

I get nothing. I'm pretty sure my scope is correct. As long as the namespace
var name matches the tag I'm after, I should be able to get to it, correct?


On Mon, Feb 9, 2009 at 3:27 PM, Taka Kojima <t...@gigafied.com> wrote:

> I just realized that the link I sent doesn't mention the namespace
> operator, which is the main thing you need...
>
> The following example uses the :: operator to identify XML properties
> with specified namespaces:
>
> var soap:Namespace = new Namespace("http://schemas.xmlsoap.org/wsdl/soap/
> ");
> var w:Namespace = new Namespace("http://weather.example.org/forecast";);
> var myXML:XML =
>    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
>     <soap:Body>
>      <w:forecast xmlns:w="http://weather.example.org/forecast";>
>       <w:city>Quito</w:city>
>       <w:country>Ecuador</w:country>
>       <date>2006-01-14</date>
>      </w:forecast>
>      </soap:Body>
>    </soap:Envelope>;
>
> trace(myXML.soap::Body.w::forecast.w::city); // Quito
>
>
> so in your case, try doing...
>
> trace(myXML.yweather::conditi...@text);
>
> should work.
>
> - Taka
>
> On Mon, Feb 9, 2009 at 12:20 PM, Taka Kojima <t...@gigafied.com> wrote:
> > I take it this is from an rss feed?
> >
> > Look into the Namespace class...
> >
> > http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Namespace.html
> >
> > Unfortunately, you didn't paste the entire XML doc so I can't guide you
> > further.
> >
> > - Taka
> >
> > On Mon, Feb 9, 2009 at 10:36 AM, Eric E. Dolecki <edole...@gmail.com>
> wrote:
> >>
> >> For example I have a node like so:
> >>
> >> <yweather:condition text="Partly Cloudy" code="30" temp="34" date="Mon,
> 09
> >> Feb 2009 12:56 pm EST"/>
> >>
> >>
> >> How can I get into that node to pull attributes out? The ":" in the node
> >> name is screwing my up at the moment.
> >>
> >> Eric
> >> _______________________________________________
> >> Flashcoders mailing list
> >> Flashcoders@chattyfig.figleaf.com
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
http://ericd.net
Interactive design and development
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to