Maybe it's Friday and I'm tired, but this just seems so weird. Something I
have done 8 billions times before and now things are acting up. Code
couldn't be much more simple.
var myLoader:URLLoader = new URLLoader();
myLoader.addEventListener( Event.COMPLETE, onLoadXML );
myLoader.load( new URLRequest( "
http://www.xignite.com/xquotes.asmx/GetQuote?Symbol=AAPL"; ));

function onLoadXML( e:Event ):void
{
var myXML:XML = new XML( e.target.data );
trace( myXML);
}

I get this:

<ExtendedQuote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns="http://www.xignite.com/services/";>
  <Outcome>Success</Outcome>
  <Message>Delay times are 15 mins for NASDAQ, NYSE and AMEX.</Message>
  <Identity>Cookie</Identity>
  <Delay>0.515625</Delay>
  <Name>Apple Inc.</Name>
  <Exchange>NASDAQ</Exchange>
  <Quote>
    <Symbol>AAPL</Symbol>
    <Previous_Close>99.27</Previous_Close>
    <Open>99.11</Open>
    <High>99.80</High>

...

In a browser I get this (for the URL):

<?xml version="1.0" encoding="utf-8"?>
<ExtendedQuote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns="http://www.xignite.com/services/";>
  <Outcome>Success</Outcome>
  <Message>Delay times are 15 mins for NASDAQ, NYSE and AMEX.</Message>
  <Identity>Cookie</Identity>
  <Delay>0.515625</Delay>
  <Name>Apple Inc.</Name>
  <Exchange>NASDAQ</Exchange>
  <Quote>
    <Symbol>AAPL</Symbol>
    <Previous_Close>99.27</Previous_Close>
    <Open>99.11</Open>
    <High>99.80</High>

Note the red definition there. I don't get that in my XML in AS3.
Anyway, When I try to trace out myXML.ExtendedQuote, I get nothing.
When I trace out myXML.Name, I get nothing. I don't see namespaced
nodes anywhere, so what exactly is going on? I just want to get at
some of that data sitting in simple nodes. So freaking weird.

Thanks for any insight,
Eric
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to