![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Strange! about getElementsByTagName [Thread Next] Re: Strange! about getElementsByTagNameTo: NULL Date: 8/9/2008 1:30:00 PM 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/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
