This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > May 2007 > how do I select all nodes from the my namespace?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author how do I select all nodes from the my namespace?
alexl

2007-05-28, 3:16 am

tried

pXMLDom->selectNodes(L"my:*",&pXMLDomNodeList);

but it didn't work

thx

Bjoern Hoehrmann

2007-05-28, 3:16 am

* alexl wrote in microsoft.public.xml:
>tried
>
>pXMLDom->selectNodes(L"my:*",&pXMLDomNodeList);
>
>but it didn't work


How did you setup the 'my' prefix? You have to declare it before use.
Does your document actually contain nodes in that namespace?
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
toudidel

2007-05-28, 6:18 am

Remember there should be any nodes in namespace declared by prefix my in
your document

--
td
www.paranoja.org

Uzytkownik "alexl" <alextheblade@XXXXXXXXXX> napisal w wiadomosci
news:1180327095.326833.217280@p47g2000hsd.googlegroups.com...

> pXMLDom->selectNodes(L"my:*",&pXMLDomNodeList);



Martin Honnen

2007-05-28, 6:17 pm

alexl wrote:
> tried
>
> pXMLDom->selectNodes(L"my:*",&pXMLDomNodeList);
>
> but it didn't work


Make sure you use setProperty "SelectionNamespaces" first e.g. (JScript
syntax)

xmlDocument.setProperty('SelectionNamespaces',
'xmlns:my="http://example.com/2007/ns1"');

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews