How can I, in a NSOutlineView, binded to a NSTreeController, driven by an NSXMLDocument, only display some NSElements (of the same type) and not others?
Thanks
How can I, in a NSOutlineView, binded to a NSTreeController, driven by an NSXMLDocument, only display some NSElements (of the same type) and not others?
Thanks
Copyright © 2021 Jogjafile Inc.
To hide some elements the
NSXMLElementhas to be subclassed. The aim it's to test if one of the children of an element it's one of the ones to be hidden and remove it from thechildrenarray:To use this class the
NSXMLDocumenthas also to be subclassed so it can replaced withNSXMLElement:From now on
childCountshould be used carefully. It will still return the number of child nodes from the XML file.Because those elements are only hidden the still can be of with functions like
elementsForName.