Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - IXMLDOMSelection clone issue [Thread Next] Re: IXMLDOMSelection clone issueTo: NULL Date: 5/30/2009 2:28:00 PM Kai wrote:
> After I get a IXMLDOMNodeList, then I make a IXMLDOMSelection. In order to
> avoid
> modification of my orginal selection, I make a copy of my selection by
> IXMLDOMSelection->clone. But I found if I use removeNext to remove unwanted
> items, the orignal selection is still modified. What is wrong?
I don't use MSXML with C++, only with script languages like JScript.
The following code snippet
var doc = new ActiveXObject('Msxml2.DOMDocument.6.0');
doc.loadXML('<root><foo>foo 1</foo></root>');
var sel = doc.selectNodes('root/foo');
var sel2 = sel.clone();
sel.removeNext();
alert(doc.xml + '\r\n' + sel.length + '\r\n' + sel2.length);
shows
<root/>
0
1
so I don't see the problem.
I have hardly seen anyone in here helping with MSXML and C++ while the
MSXML MSDN forum
http://social.msdn.microsoft.com/Forums/en-US/msxml/threads/ seems to
have some MS contributors and participants which help with C++. Thus if
you think the problem might be specific to using MSXML with C++ you
might find more valuable help in that forum.
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
