Add XmlNode parent #14
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a
_parentmember and agetParent()method to XmlNode.This is convenient for traversing parent ancestry. However, it does break backwards compatibility with respect to the previous ability to add an XmlNode to multiple locations in the DOM. This change now enforces a 1 to 1 relationship between a parent and a child.
However, the ability to clone and duplicate XmlNode and derivative objects is a convenient way to attach the same content to different locations in the XML DOM and prevents surprises when content changes in multiple places from shared objects. PR #13 introduces this support and this PR depends on it.