all groups > dotnet xml > may 2005 >
You're in the

dotnet xml

group:

How to add namespace to msxml2.DOMDocument40Class ... Help needed


Re: How to add namespace to msxml2.DOMDocument40Class ... Help needed Martin Honnen
5/30/2005 12:00:00 AM
dotnet xml:

[quoted text, click to view]

What do you want to add a namespace for? If you want to use XPath
selection then use
xformsdoc.setProperty "SelectionNamespaces", "xmlns:xforms='" &
nameSpace & "'"

If you want to change the namespace of an element or attribute node you
cannot simply add a namespace, you need to recreate the node with the
proper namespace and replace the old node with the new node.

--

Martin Honnen --- MVP XML
How to add namespace to msxml2.DOMDocument40Class ... Help needed Sankaran K via .NET 247
5/30/2005 1:54:17 AM
Could anyone tell me how to add a namespace to msxml2.domdocument40class object.
I tried

String nameSpace = "http://www.w3.org/2002/xforms";
msxml2.domdocument40class xformsdoc;
xformsdoc.namespaces.add("xforms",nameSpace);
But it doesn't work.
Could anyone tel me how it works?
Thanks in advance


--------------------------------
From: Sankaran K

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

AddThis Social Bookmark Button