Click here to Skip to main content
16,005,389 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDLL question ( clueless ) Pin
Maximilien21-Jun-05 4:05
Maximilien21-Jun-05 4:05 
GeneralRe: DLL question ( clueless ) Pin
LCI21-Jun-05 4:15
LCI21-Jun-05 4:15 
GeneralRe: DLL question ( clueless ) Pin
Tom Archer21-Jun-05 4:15
Tom Archer21-Jun-05 4:15 
GeneralRe: DLL question ( clueless ) Pin
Antony M Kancidrowski21-Jun-05 4:24
Antony M Kancidrowski21-Jun-05 4:24 
GeneralRe: DLL question ( clueless ) probably self-answered Pin
Maximilien21-Jun-05 4:30
Maximilien21-Jun-05 4:30 
GeneralRe: DLL question ( clueless ) probably self-answered Pin
Antony M Kancidrowski21-Jun-05 4:44
Antony M Kancidrowski21-Jun-05 4:44 
QuestionSDI w/ splitter - SetActiveView()??? Pin
lynchspawn21-Jun-05 4:04
lynchspawn21-Jun-05 4:04 
GeneralReading a node value from XML file Pin
LCI21-Jun-05 3:40
LCI21-Jun-05 3:40 
Can someone please tell me what i am doing wrong here. I can load the XML file fine but when i select the node that i want and try to retrieve the text, i get nothing back.


std::string value;
HRESULT hr;
MSXML2::IXMLDOMDocumentPtr pDocument;
MSXML2::IXMLDOMNodePtr ptagNode;

_bstr_t mybstrtagResponseKey = "//Response//ResponseKey";
_bstr_t mybstrtagResponseText = "//Response//ResponseText";

_bstr_t myxmlfile = "C:\\sample.xml";

// Create XMLDOMDocument
hr = CoInitialize(NULL);

hr = pDocument.CreateInstance("Msxml2.DOMDocument.4.0");


if (FAILED(hr))
{

}
try
{
// Load xml file.
if (pDocument->load(myxmlfile)!= VARIANT_TRUE)
{
}

else
{
ptagNode = pDocument->selectSingleNode(mybstrtagResponseKey);
//if text exists, get it...
while (ptagNode)
{
value = ptagNode->text;



}

}

}
GeneralRe: Reading a node value from XML file Pin
Tom Archer21-Jun-05 4:24
Tom Archer21-Jun-05 4:24 
GeneralRe: Reading a node value from XML file Pin
Tom Archer21-Jun-05 4:27
Tom Archer21-Jun-05 4:27 
GeneralRe: Reading a node value from XML file Pin
LCI21-Jun-05 5:03
LCI21-Jun-05 5:03 
Generalusing ifstream to read a file. Pin
Hachaso21-Jun-05 2:12
Hachaso21-Jun-05 2:12 
GeneralRe: using ifstream to read a file. Pin
xiaohe52121-Jun-05 3:17
xiaohe52121-Jun-05 3:17 
GeneralRe: using ifstream to read a file. Pin
Hachaso21-Jun-05 3:32
Hachaso21-Jun-05 3:32 
GeneralRe: using ifstream to read a file. Pin
S. Senthil Kumar21-Jun-05 3:34
S. Senthil Kumar21-Jun-05 3:34 
GeneralSave & Open Pin
suroor45321-Jun-05 1:52
suroor45321-Jun-05 1:52 
GeneralRe: Save & Open Pin
ThatsAlok21-Jun-05 2:14
ThatsAlok21-Jun-05 2:14 
GeneralRe: Save & Open Pin
xiaohe52121-Jun-05 3:12
xiaohe52121-Jun-05 3:12 
GeneralRe: Save & Open Pin
suroor45322-Jun-05 3:04
suroor45322-Jun-05 3:04 
GeneralCrash when using EditSecurity function Pin
Sudhir Mangla21-Jun-05 1:33
professionalSudhir Mangla21-Jun-05 1:33 
GeneralDebugging Internet Explorer Pin
munawar196821-Jun-05 0:58
munawar196821-Jun-05 0:58 
GeneralRe: Debugging Internet Explorer Pin
BlackDice21-Jun-05 6:25
BlackDice21-Jun-05 6:25 
GeneralCaps Lock Indicator Problem ! Pin
AbinThomas21-Jun-05 0:41
AbinThomas21-Jun-05 0:41 
GeneralRe: Caps Lock Indicator Problem ! Pin
Cool Ju21-Jun-05 2:22
Cool Ju21-Jun-05 2:22 
GeneralDetecting media present in a CD drive Pin
fainley20-Jun-05 23:10
fainley20-Jun-05 23:10 

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.