Skip to content

Feature/add isdescendant and isancestor method#75

Open
aoifukuoka wants to merge 2 commits intorobbiehanson:masterfrom
aoifukuoka:feature/add_isdescendant_and_isancestor_method
Open

Feature/add isdescendant and isancestor method#75
aoifukuoka wants to merge 2 commits intorobbiehanson:masterfrom
aoifukuoka:feature/add_isdescendant_and_isancestor_method

Conversation

@aoifukuoka
Copy link
Copy Markdown

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.

@chrisballinger
Copy link
Copy Markdown
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants