Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add isdescendant and isancestor method #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aoifukuoka
Copy link

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
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