It's an air app but that shouldn't matter.  If you download the file
bellow and put it in data/frankTT.xml you can try it too.

I was inspecting my XML through the debugger, but I think you want me
to do it this way.

Here it is:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="onInit()">
        <mx:XML id="dataSet" source="data/frankTT.xml" format="e4x" />
        <mx:Script>
                <![CDATA[
                        
                        private function onInit():void{

                                var myXML2:XMLList = dataSet..Trackpoint
                                trace(myXML2.toXMLString());
                        }
                ]]>
        </mx:Script>
        <mx:Panel>
                
        </mx:Panel>
        
</mx:WindowedApplication>


--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Just to be sure, you are using toXMLString() to inspect the xml,
> correct?
> 
>  
> 
> In fact, post the code where you are examining myXMLList.
> 
>  
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Nate Pearson
> Sent: Thursday, April 17, 2008 4:19 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Problems walking XML file with E4X
> 
>  
> 
> The trace shows all the data.
> 
> The other one doesn't work. I can see in the file that the case is
> "Trackpoint". Could it have to do with how it's nested?
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Tracy Spratt" <tspratt@> wrote:
> >
> > Skip this:
> > 
> > var myXML:XML = dataSet[0]; //dataSet is aleady XML
> > 
> > 
> > 
> > Do: 
> > 
> > trace(dataSet.toXMLString()); // USE toXMLString() always with xml
> > 
> > 
> > 
> > Try:
> > 
> > var myXMLList:XMLList = dataSet..Trackpoint; //NOTE CASE of TrackPoint
> > 
> > 
> > 
> > Tracy
> > 
> > 
> > 
> > ________________________________
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Nate Pearson
> > Sent: Thursday, April 17, 2008 4:07 PM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Problems walking XML file with E4X
> > 
> > 
> > 
> > So I'm new to this whole xml thing (i usually use objects).
> > 
> > I have this xml file:
> >
> http://trail.motionbased.com/trail/export.mb?episodePkValues=5413584&tra
> <http://trail.motionbased.com/trail/export.mb?episodePkValues=5413584&tr
> a> 
> > iningCenterExport.courseMode=true
> >
> <http://trail.motionbased.com/trail/export.mb?episodePkValues=5413584&tr
> <http://trail.motionbased.com/trail/export.mb?episodePkValues=5413584&tr
> > 
> > ainingCenterExport.courseMode=true> 
> > 
> > The structure is like this:
> > <TrainingCenterDatabase>
> > <Courses>
> > <CourseFolder>
> > <Course>
> > <Track>
> > <Trackpoint/>
> > <Trackpoint/>
> > <Trackpoint/>
> > 
> > I want to get to the Trackpoint data.
> > 
> > In my App I have (I renamed the file):
> > <mx:XML id="dataSet" source="data/frankTT.xml" format="e4x" />
> > 
> > Then to put it into an XMLList I go:
> > var myXML:XML = dataSet[0]
> > var myXMLList:XMLList = myXML..TrackPoint
> > 
> > That doesn't work though, myXMLList is empty! How do I walk this file?
> > 
> > Thanks!
> > 
> > Nate
> >
>


Reply via email to