Click here to Skip to main content
15,890,690 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detect keypress count Pin
CPallini24-Dec-11 4:42
mveCPallini24-Dec-11 4:42 
QuestionRe: Detect keypress count Pin
David Crow23-Dec-11 9:28
David Crow23-Dec-11 9:28 
AnswerRe: Detect keypress count Pin
Gary R. Wheeler23-Dec-11 23:56
Gary R. Wheeler23-Dec-11 23:56 
AnswerRe: Detect keypress count Pin
Lactoferrin24-Dec-11 1:45
Lactoferrin24-Dec-11 1:45 
AnswerRe: Detect keypress count Pin
Software_Developer24-Dec-11 4:54
Software_Developer24-Dec-11 4:54 
QuestionHow GetObjectSchema() to work ? Pin
André Dewispelaere23-Dec-11 3:43
André Dewispelaere23-Dec-11 3:43 
AnswerRe: How GetObjectSchema() to work ? Pin
Mohibur Rashid26-Dec-11 22:13
professionalMohibur Rashid26-Dec-11 22:13 
QuestionHow to Delete A Node with its all Child in XML File ? Pin
002comp22-Dec-11 23:18
002comp22-Dec-11 23:18 
Hello Friends
I am writing a XMl file using MSXML.
Some of nodes are having child.When I am rewriting the same node then first I am deleting the node And All its child one by one like this :

C++
void fnDeleteChildNode(MSXML::IXMLDOMNodePtr pMainNode)
{
     MSXML::IXMLDOMNodePtr pChild,pDeletedNodePtr;
     MSXML::IXMLDOMNodeListPtr pChildList = pMainNode->GetchildNodes();
     int noOfChild = pChildList->Getlength();
     if(noOfChild > 0)
     {
	for(pChild = pMainNode->firstChild; pChild != NULL; pChild = pDeletedNodePtr)
	{
	   pDeletedNodePtr = pChild->nextSibling;
	   pMainNode->removeChild(pMainNode->firstChild);
	}
     }
}


But I dont want to delete its child one by one.I want to know is there any fn tht will directly delete all of its child ?

Thanks In Advance.
Regards
Yogesh
AnswerRe: How to Delete A Node with its all Child in XML File ? Pin
CPallini22-Dec-11 23:40
mveCPallini22-Dec-11 23:40 
AnswerRe: How to Delete A Node with its all Child in XML File ? Pin
jschell23-Dec-11 10:01
jschell23-Dec-11 10:01 
QuestionFinding an item in linked list (CList) Pin
VCProgrammer22-Dec-11 19:00
VCProgrammer22-Dec-11 19:00 
AnswerRe: Finding an item in linked list (CList) Pin
Richard MacCutchan22-Dec-11 22:45
mveRichard MacCutchan22-Dec-11 22:45 
SuggestionRe: Finding an item in linked list (CList) Pin
David Crow23-Dec-11 3:35
David Crow23-Dec-11 3:35 
GeneralRe: Finding an item in linked list (CList) Pin
Richard MacCutchan23-Dec-11 4:46
mveRichard MacCutchan23-Dec-11 4:46 
AnswerRe: Finding an item in linked list (CList) Pin
smileangle27-Dec-11 13:37
smileangle27-Dec-11 13:37 
QuestionHeap error on std::string deletion from local function Pin
Fred Ackers22-Dec-11 1:04
Fred Ackers22-Dec-11 1:04 
AnswerRe: Heap error on std::string deletion from local function Pin
Chris Losinger22-Dec-11 1:34
professionalChris Losinger22-Dec-11 1:34 
GeneralRe: Heap error on std::string deletion from local function Pin
Fred Ackers22-Dec-11 9:33
Fred Ackers22-Dec-11 9:33 
GeneralRe: Heap error on std::string deletion from local function Pin
Chris Losinger22-Dec-11 9:55
professionalChris Losinger22-Dec-11 9:55 
GeneralRe: Heap error on std::string deletion from local function Pin
Fred Ackers22-Dec-11 10:44
Fred Ackers22-Dec-11 10:44 
AnswerRe: Heap error on std::string deletion from local function Pin
Erudite_Eric22-Dec-11 4:28
Erudite_Eric22-Dec-11 4:28 
AnswerRe: Heap error on std::string deletion from local function Pin
Erudite_Eric23-Dec-11 23:48
Erudite_Eric23-Dec-11 23:48 
GeneralRe: Heap error on std::string deletion from local function Pin
Fred Ackers24-Dec-11 7:16
Fred Ackers24-Dec-11 7:16 
GeneralRe: Heap error on std::string deletion from local function Pin
Erudite_Eric26-Dec-11 0:57
Erudite_Eric26-Dec-11 0:57 
AnswerRe: Heap error on std::string deletion from local function Pin
Mikhail Semenov23-Jan-12 3:50
Mikhail Semenov23-Jan-12 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.