Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: IXMLDOMSelection clone issue

From: Martin Honnen <mahotrash@-----.-->
To: 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent