473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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

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/)

<Id>mxldUQ2oAk+xmeqyfYFvUw==</Id>
Nov 12 '05 #1
1 3006


Sankaran K via .NET 247 wrote:
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?


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
http://JavaScript.FAQTs.com/
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dan Sikorsky | last post by:
Uploading from browser to server using Msxml2.XMLHTTP takes a long time about 15 minutes for a 1.5MB file at 37.2Kbps, although it does get there. Is there anyway to speed things up? here's the...
3
by: hb | last post by:
Hi, I need to use MSXML2.DOMDocument in my ASP page. The following is my code: xml.asp: ===== <% dim sx sx="<root><a>text1</a><b>text2</b></root>" dim xd
17
by: Patrick | last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application? However, would I only be able to call...
2
by: dc | last post by:
i have a xml file like this: <?xml version="1.0" encoding="utf-8"?> <validate xmlns="http://tempuri.org/fieldValidate.xsd"> <field name="Short Name" type="SN" length="10"> <requiredChar...
4
by: Kevin Newman | last post by:
The primary problem I've had with php is the lack of namespaces, which makes OOP very difficult to organize, since you end up with large number of classes cluttering up the same namespace - which...
0
by: Daniel | last post by:
Does system.xml have any way to transofrm data with an xswl style sheet using strings like MSXML2 does? how to convert this to use System.XML so i do not depend on MSXML2 interop? static...
1
by: Daniel Lidström | last post by:
Hello! I'm using msxml3 in the C++ environment, VC 7.1.3088. How do I know if the namespace attribute doesn't exist? I want to put it in a std::string, and I try to do that like this: string...
17
by: Peng Yu | last post by:
Hi, I'm wondering if there is something in namespace like the 'private' keyword in class? I want to define some class or function that can only be used within that namespace. Thanks, Peng
1
by: Steve | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.