Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Parsing XML with namespace in IE. (getElementsByTagNameNS()) [Thread Next] Re: Parsing XML with namespace in IE. (getElementsByTagNameNS())To: NULL Date: 11/4/2008 5:00:00 PM "Steve" <stephen.joung@g...> wrote in message news:8e1bb314-c61c-4fdc-8d9f-fd228715dc75@p...... > With the help of this newsgroup and Google I have got this code > working fully in Firefox and can alert the XML in IE but because IE > does not impliment the DOM "getElementsByTagNameNS()" function I > cannot read the individual rates from the Cube namespace. > > Is there a wrapper or some other relatively simple method of getting > IE to do what in Firefox is straighforward? > You could always use XPath instead. Instead of "Microsoft.XMLDOM" use "MSXML2.DomDocument.3.0". The set the SelectionLanguage doc1.setProperty("SelectionLanguage", "XPath") then the namespace prefix: doc1.setProperty("SelectionNamespaces", "xmlns:df = ''http://www.ecb.int/ vocabulary/2002-08-01/eurofxref'"); Then use XPath: var cubes = doc1.selectNodes(<xpath expression here>); If you show the XML I can tell you the XPath :) -- Joe Fawcett (MVP - XML) http://joe.fawcett.name | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
