Click here to Skip to main content
15,914,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCEditView and XP Manifest Pin
paulb11-Aug-04 20:11
paulb11-Aug-04 20:11 
GeneralOpen *.jpg with iexplore.exe Pin
Member 22148011-Aug-04 20:08
Member 22148011-Aug-04 20:08 
GeneralRe: Open *.jpg with iexplore.exe Pin
dipeka11-Aug-04 22:41
dipeka11-Aug-04 22:41 
GeneralIWinHttpRequest Pin
sereneguy11-Aug-04 20:08
sereneguy11-Aug-04 20:08 
QuestionHow to access USB port from VC++ Pin
Fatboyslim11-Aug-04 20:07
Fatboyslim11-Aug-04 20:07 
GeneralXML Parsing Pin
11-Aug-04 19:19
suss11-Aug-04 19:19 
GeneralRe: XML Parsing Pin
11-Aug-04 19:49
suss11-Aug-04 19:49 
GeneralRe: XML Parsing Pin
*Dreamz11-Aug-04 20:41
*Dreamz11-Aug-04 20:41 
		IXMLDOMDocument *pDomDoc;<br />
		IXMLDOMNodeList		*pXMLDOMNodeList = NULL;<br />
		IXMLDOMNode			*pXMLDOMNode = NULL,<br />
							*pXMLAttrNode = NULL,<br />
							*pXMLChildNode = NULL;<br />
		IXMLDOMNamedNodeMap *pXMLAttributes = NULL;<br />
<br />
		IXMLDOMNode *pXMLParentNode = NULL,<br />
					*pXMLGrandParentNode = NULL;<br />
<br />
		CString strAttributeValue;<br />
		CComBSTR bstrAttrName;<br />
		HRESULT	hResult;<br />
<br />
		//Create the Instance for IXMLDOMDocument<br />
		hResult = CoCreateInstance(CLSID_DOMDocument,<br />
								   NULL,<br />
								   CLSCTX_INPROC_SERVER,<br />
								   IID_IXMLDOMDocument,<br />
								   reinterpret_cast<void**>(&lpDomDoc));<br />
		if(FAILED(hResult))<br />
			return FALSE;<br />
		hResult = pDomDoc->put_async(FALSE);<br />
		if(FAILED(hResult))<br />
			return FALSE;<br />
<br />
		CComVariant		vFileName(szXmlFilePath);<br />
		VARIANT_BOOL	vBool;<br />
		//Loading the Specified File<br />
		pDomDoc->load(vFileName,&vBool);<br />
		if(VARIANT_TRUE == vBool)<br />
		{<br />
			hResult = pDomDoc->getElementsByTagName(L"Name", &pXMLDOMNodeList);<br />
			if(FAILED(hResult))<br />
				return FALSE;<br />
<br />
			//Get the First Node from the List<br />
			hResult = pXMLDOMNodeList->nextNode(&pXMLDOMNode); //Get this in a loop if u have more than one Name Node<br />
			if(FAILED(hResult))<br />
				return FALSE;<br />
<br />
			hResult = pXMLDOMNode->get_attributes(&pXMLDOMNamedNodeMap);<br />
			if(FAILED(hResult) || pXMLDOMNamedNodeMap == NULL )<br />
				return FALSE;<br />
<br />
			bstrAttrName = "Code"; //Use for other attributes also..<br />
			hResult = pXMLDOMNamedNodeMap->getNamedItem(bstrAttrName,&pXMLAttrNode);<br />
			if(FAILED(hResult) || pXMLAttrNode == NULL)<br />
				return FALSE;<br />
			hResult = pXMLAttrNode->get_nodeValue(&varNodeValue);<br />
			if(FAILED(hResult))<br />
				return FALSE;<br />
			strAttributeValue.Format(_T("%S"),V_BSTR(&varNodeValue));<br />
		}<br />
		else<br />
			return FALSE;


Hope this will help you ...
GeneralRe: XML Parsing Pin
paulb11-Aug-04 21:10
paulb11-Aug-04 21:10 
GeneralRe: XML Parsing Pin
Rassul Yunussov12-Aug-04 0:09
Rassul Yunussov12-Aug-04 0:09 
GeneralMultithreading - passing message to a window question Pin
Indrawati11-Aug-04 19:05
Indrawati11-Aug-04 19:05 
GeneralRe: Multithreading - passing message to a window question Pin
Milton Karimbekallil11-Aug-04 20:50
Milton Karimbekallil11-Aug-04 20:50 
GeneralRe: Multithreading - passing message to a window question Pin
Ravi Bhavnani11-Aug-04 20:52
professionalRavi Bhavnani11-Aug-04 20:52 
GeneralRe: Multithreading - passing message to a window question Pin
Rory Solley11-Aug-04 21:29
Rory Solley11-Aug-04 21:29 
GeneralRe: Multithreading - passing message to a window question Pin
Anonymous11-Aug-04 21:32
Anonymous11-Aug-04 21:32 
Generalconvert CString to Unicode (hex) Pin
ba5h33r11-Aug-04 18:47
ba5h33r11-Aug-04 18:47 
GeneralRe: convert CString to Unicode (hex) Pin
Tim Smith11-Aug-04 18:57
Tim Smith11-Aug-04 18:57 
GeneralRe: convert CString to Unicode (hex) Pin
paulb11-Aug-04 20:24
paulb11-Aug-04 20:24 
GeneralWinLogon HWND Pin
GutterBoy11-Aug-04 18:00
GutterBoy11-Aug-04 18:00 
GeneralRe: WinLogon HWND Pin
Milton Karimbekallil11-Aug-04 21:14
Milton Karimbekallil11-Aug-04 21:14 
GeneralRe: WinLogon HWND Pin
GutterBoy12-Aug-04 2:15
GutterBoy12-Aug-04 2:15 
GeneralRe: WinLogon HWND Pin
GutterBoy12-Aug-04 2:17
GutterBoy12-Aug-04 2:17 
GeneralRe: WinLogon HWND Pin
Milton Karimbekallil12-Aug-04 2:49
Milton Karimbekallil12-Aug-04 2:49 
GeneralRe: WinLogon HWND Pin
gafman12-Aug-04 5:21
gafman12-Aug-04 5:21 
GeneralCopyFileEx not working Pin
kelkatu11-Aug-04 17:39
kelkatu11-Aug-04 17:39 

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.