KissXML
KissXML copied to clipboard
Feature/add isdescendant and isancestor method
Hi. This adds two method. I wrote this method along with Swift 3.
- isDescendant method
This method returns if given node is descendant of self. - isAncestor method
This method returns if given node is ancestor of self.
please review my PR.
Thank you.
DDXML is supposed to mirror the upstream NSXML API, allowing the end user to swap out KissXML for NSXML on macOS. Perhaps this can be moved to a generic category method on NSXMLNode that works on both? NSXMLNode+DDXML.h, and then prefix the methods with ddxml_. You'll also need to make sure it works even when the NSXML<->DDXML preprocessor stuff is turned off.
Also, please add a test here to ensure that your category : https://github.com/robbiehanson/KissXML/blob/master/Tests/Shared/KissXMLTests.m