a xml file. the doc has a node <content src='...'/>, all node can be get by using getElementsByTagName(L"*",...), but i cannot get the <content> element by using this: getElementsByTagName(L"content",...) even: getElementsByTagName(CComBSTR(L"content"),...) why? link to the file: http://alovespring.googlecode.com/files/test.xml
susan wrote: > a xml file. > the doc has a node <content src='...'/>, > all node can be get by using getElementsByTagName(L"*",...), > but i cannot get the <content> element by using this: > getElementsByTagName(L"content",...) > even: > getElementsByTagName(CComBSTR(L"content"),...) > > why? > > link to the file: > http://alovespring.googlecode.com/files/test.xml You might need XPath and selectSingleNode or selectNodes together with namespaces e.g. (JScript syntax) xmlDoc.setProperty("SelectionLanguage", "XPath") xmlDoc.setProperty("SelectionNamespaces", "xmlns:atom='http://www.w3.org/2005/Atom'") var nodeList = xmlDoc.selectNodes("//atom:content") as those elements are in the Atom namespace. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/