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

Make xml.Nodeset relevant #54

Closed
jbowtie opened this issue Oct 29, 2013 · 1 comment
Closed

Make xml.Nodeset relevant #54

jbowtie opened this issue Oct 29, 2013 · 1 comment

Comments

@jbowtie
Copy link
Contributor

jbowtie commented Oct 29, 2013

The current implementation of NodeSet ( see xml/nodeset.go ) appears to be unused, and frankly it doesn't appear to be provide any useful functionality.

I propose this be changed to:

type Nodeset []Node

This can then be extended with some useful functionality. Specifically, I'd add functions to convert to and from a collection of unsafe.Pointer, a C.xmlXPathNodeSet structure, and a C.xmlXPathResultValueTree (which is a nodeset with an extra bit set for libxml).

We can then eliminate some duplicate code internally and simplify some type switches by using a Nodeset. I'd prefer to update the method signatures where appropriate but have no issue with us leaving those as is.

@mdayaram
Copy link
Contributor

The current implementation does indeed seem to be unused. I wouldn't be opposed to this change. 👍

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

No branches or pull requests

2 participants