cezheng / Fuzi

A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
MIT License
1.08k stars 161 forks source link

Declare additional namespace prefixes to be used with XPath #100

Closed mickael-menu-mantano closed 5 years ago

mickael-menu-mantano commented 5 years ago

Fixes #99

This allows to declare additional namespace prefixes that are not already declared in the document. This is useful to be write XPath expressions without knowing how the document was authored.

Several prefixes can be used for the same namespace, so a node can be queried both using the prefix declared in the document, and the one defined on XMLDocument.

(PS: The unit tests are still working with those changes)

cezheng commented 5 years ago

Again thank you so much for helping to make this library better!