KissXML icon indicating copy to clipboard operation
KissXML copied to clipboard

Feature/add isdescendant and isancestor method

Open aoifukuoka opened this issue 9 years ago • 1 comments

Hi. This adds two method. I wrote this method along with Swift 3.

  1. isDescendant method
    This method returns if given node is descendant of self.
  2. isAncestor method
    This method returns if given node is ancestor of self.

please review my PR.

Thank you.

aoifukuoka avatar Oct 06 '16 14:10 aoifukuoka

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

chrisballinger avatar Oct 06 '16 16:10 chrisballinger