1 Reply Latest reply on Jun 10, 2009 2:12 AM by Richard_Abbott

    Doubt in xml?

    karthik flex

      hi

       

      i have an xml

       

      <root>
      <data>
      <time datas="Hello" second="one">08:00</time>
      <time datas="Hello1" second="two">08:00</time>

      <john>08:15 Sick Call,08:25 Lung Problem,08:30 Kidney Problem</john>
      <michel>08:15 Sick Call,</michel>
      </data>
      <data>
      <time datas="John" second="Bye">09:00</time>
      <john>09:15 Sick Call,</john>
      <michel>09:25 Lung Problem,09:15 Sick Call,09:30 Kidney Problem</michel>
      </data>
      </root>

       

       

      inside data node you can see in red two "time" node when i access this it is not displaying one below the other it is coming continuously

       

      it is displaying as

       

      HelloHello1 onetwo

      but i need as

      Hello one
      Hello1 two

      inside one cell

       

      any idea

       

      karthik.k

        • 1. Re: Doubt in xml?
          Richard_Abbott Level 3

          karthik,

          I imagine you are using this as data provider for a DataGrid? If so, it probably assumes a single tag of the indicated name within the hierarchy. To get round this, you would:

          a) Add your own renderer for the column in question

          b) in the renderer code, get all the <time> children into an XMLList (something like root.data.descendants("time"))

          c) iterate over the XMLList and add the desired new line breaks between each item

          Richard