dnewcome / jath

Jath is a simple template language for parsing xml using json markup.
MIT License
68 stars 15 forks source link

Add XML namespace support for MSIE #2

Open dnewcome opened 14 years ago

dnewcome commented 14 years ago

Current implementation of Jath for MSIE does not resolve namespaces. XML namespace support should be added to bring MSIE to parity with the other supported browsers.

See test cases 8 on. Namespaces specified as part of the XPath query will work, but prefixes that require a resolver will not work currently.

dnewcome commented 13 years ago

Adding a resolver to an xml document in MSIE looks something like this:

xmldoc.setProperty("SelectionNamespaces", "xmlns:wrox='http://www.wrox.com/' xmlns='http://www.amazon.com/'"); var book = xmldoc.documentElement.selectSingleNode("wrox:book");

Note that the resolver list is added as a property of the xml document that we wish to parse using jath.

From: http://www.nczonline.net/blog/2009/04/04/xpath-in-javascript-part-3/