Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: IXMLDOMSelection clone issue IXMLDOMSelection clone issueTo: NULL Date: 5/30/2009 4:56:00 AM 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?
see my code,
IXMLDOMNodeList *pNodes=NULL;
IXMLDOMSelection *pSelection=NULL;
CHECK(pNodes->get_length(&uLength), "get selection length");
CHECK(pNodes->QueryInterface(IID_IXMLDOMSelection,(void**)&pSelection), "");
SAFE_RELEASE(pNodes);
if(SUCCEEDED(hr) && pSelection && uLength)
{
IXMLDOMSelection *MySelection;
pSelection->clone(&MySelection);
SAFE_RELEASE(pSelection);
.....
MySelection->peekNode(&pNode);
pNode->get_text(&bstr);
......
MySelection->removeNext(&pNode);
}
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
