chrsan / css-selectors

An implementation of the W3C Selectors Level 3 specification.
Other
114 stars 25 forks source link

Namespaces? #10

Open sampov2 opened 12 years ago

sampov2 commented 12 years ago

What a great tool. However, I really need namespace-awareness. More specifically, I need to match elements belonging to certain namespaces.

Document document = factory.newDocumentBuilder().parse(input); DOMNodeSelector nodeSelector = new DOMNodeSelector(document); nodeSelector.registerNamespace("namespace", "http://www.what.com/namespace/1.0");

Set result = nodeSelector.querySelectorAll("namespace|Element > namespace|Child");

Do you have any interest in such a feature?

chrsan commented 12 years ago

Hi!

Thanks a lot. I my self doesn't have any need for that but wouldn't mind that feature being part of the library. Do you have any suggestion up front of how to do it?

/Christer

On Tue, Oct 23, 2012 at 3:16 PM, sampov2 notifications@github.com wrote:

What a great tool. However, I really need namespace-awareness. More specifically, I need to match elements belonging to certain namespaces.

Document document = factory.newDocumentBuilder().parse(input); DOMNodeSelector nodeSelector = new DOMNodeSelector(document); nodeSelector.registerNamespace("namespace", " http://www.what.com/namespace/1.0");

Set result = nodeSelector.querySelectorAll("namespace|Element > namespace|Child");

Do you have any interest in such a feature?

— Reply to this email directly or view it on GitHubhttps://github.com/chrsan/css-selectors/issues/10.