I started with Flex a couple days ago and I'm just learning the
basics. This shouldn't be too hard to answer, but getting me to
understand it would be the hard part! If I have an XML file with
parents, children, and siblings (see the example below), how can I
link say a DataGrid to a child element, but access its children? Refer
to the sample XML file below. Let's call it test.xml

<?xml version="1.0" encoding="utf-8"?>
<Schedule>
 <Semester id='Spring08'>
  <Department id='ACCT' name='Accounting'>
   <Course id='211' name='Financial Accounting'>
    <Section id='DIS01' limit='150' enroll='71'>
     <Section id='ACT50' limit='25' enroll='8'/>
     <Section id='ACT51' limit='25' enroll='12'/>
    </Section>
    <Section id='DIS02' limit='41' enroll='23'>
     <Section id='ACT56' limit='41' enroll='23'/>
    </Section>
   </Course>
   <Course ....>
    <Section ...>
     ....
    </Section>
   </Course>
   ...
  </Department>
  ...
 </Semester>
 ...
</Schedule>



>From what I understand, one way to get this document into the DataGrid
is to create an HTTPService that connects to the XML file and give it
an id, we'll call it 'file'. So in the DataGrid we would say
"dataProvider='file.Schedule.Semester.Department.Course.Section'"? If
this is the case, how does the DataGrid know what attributes to pull
out of the elements and how is this displayed?

Let's say I want to do some OOP and make an object for every Semester,
Department, Course, and Section. How would I read this data and create
the objects? Fields of the objects would be equivalent to the
attributes to the elements. 

Thank you all for the support

Reply via email to