Hide the last children of an XML data provider (not to be displayed in mx:Tree)
        Posted  
        
            by Andree
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andree
        
        
        
        Published on 2010-04-06T16:42:36Z
        Indexed on 
            2010/04/07
            10:13 UTC
        
        
        Read the original article
        Hit count: 344
        
flex
|actionscript
Hi there!
I have an hierachical XML data, and I want to display it as a tree. The XML data is something like this:
<services>
  <service name="TestService" endpoint="">
    <method name="sayHi">
      <parameter name="firstName" />
      <parameter name="lastName" />
    </method>
    <method name="sayGoodbye">
      <parameter name="firstName" />
      <parameter name="lastName" />
    </method>
  </service>
  <service name="AnotherTestService">
    <method name="getName" />
    <method name="setName">
      <parameter name="name" />
    </method>
  </service>
</services>
However, I don't want to display the last elements (parameters) in the tree because, well, it is not meant to be displayed, but still it has to be there.
Any advice on how can I achieve that? I am thinking of either extending DefaultDataDescriptor or create a class which implement ITreeDataDescriptor. Which approach will be suitable in this case?
© Stack Overflow or respective owner