Hide the last children of an XML data provider (not to be displayed in mx:Tree)
- by Andree
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?