Click here to Skip to main content
15,920,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Calling .NET DLL from MFC app Pin
jhwurmbach10-Jan-08 4:56
jhwurmbach10-Jan-08 4:56 
GeneralRe: Calling .NET DLL from MFC app Pin
hairy_hats10-Jan-08 5:05
hairy_hats10-Jan-08 5:05 
GeneralRe: Calling .NET DLL from MFC app Pin
jhwurmbach10-Jan-08 5:21
jhwurmbach10-Jan-08 5:21 
GeneralRe: Calling .NET DLL from MFC app [modified] Pin
CPallini10-Jan-08 4:52
mveCPallini10-Jan-08 4:52 
GeneralRe: Calling .NET DLL from MFC app Pin
Matthew Faithfull10-Jan-08 5:57
Matthew Faithfull10-Jan-08 5:57 
GeneralRe: Calling .NET DLL from MFC app Pin
hairy_hats10-Jan-08 6:03
hairy_hats10-Jan-08 6:03 
QuestionMFC and printing financial reports (numbers in a grid, essentially) of more then one page Pin
Sternocera10-Jan-08 4:15
Sternocera10-Jan-08 4:15 
QuestionHow to update xml attributes using console application Pin
sharanu10-Jan-08 0:53
sharanu10-Jan-08 0:53 
I have the code to read xml.where i used xml parser to read and write.but i am unable to update attribute in xml.plz do the needful.
my code is..
try
{

MSXML2::IXMLDOMProcessingInstructionPtr pPI = NULL;
MSXML2::IXMLDOMDocument2Ptr pXMLDoc = NULL;
MSXML2::IXMLDOMNodePtr pNode = NULL;
MSXML2::IXMLDOMNodeListPtr pXMLDomNodeList = NULL;
MSXML2::IXMLDOMNodePtr pRootNode= NULL;


EVAL_HR(CoInitialize(NULL));

// Create MSXML DOM object
EVAL_HR(pXMLDoc.CreateInstance(("Msxml2.DOMDocument.4.0")));

// Step 1: Creating the Processing Instruction

pPI = pXMLDoc->createProcessingInstruction
("xml", "version='1.0' encoding='UTF-8'");

_variant_t vNullVal;
vNullVal.vt = VT_NULL;
pXMLDoc->insertBefore(pPI, vNullVal);

// ---------------------------------------------
// Step 2: Creating the Root Element

_variant_t varNodeType((short)MSXML2::NODE_ELEMENT);

pRootNode= pXMLDoc->createNode(varNodeType,
("Root"),(""));
pXMLDoc->appendChild(pRootNode);

// ------------------------------------------
// Step 3: Creating Attribute Node

MSXML2::IXMLDOMNodePtr pAttNode= NULL;


// Step 4: Creating attribute name element
MSXML2::IXMLDOMAttributePtr pattIdAttr = NULL;
pattIdAttr= pXMLDoc->createAttribute(("Name"));
pattIdAttr->nodeTypedValue = ("Namevalue");
pAttNode->attributes->setNamedItem(pattIdAttr);
//doc.DocumentElement.AppendChild(newElem);

//xe.Element("address").SetElement("city", "MANCHESTER");

pXMLDoc->save("D:\\Book1.xml");
}
catch(...)
{

}

CoUninitialize();
thanking you
sharan

Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan

AnswerRe: How to update xml attributes using console application Pin
David Crow10-Jan-08 2:17
David Crow10-Jan-08 2:17 
AnswerRe: How to update xml attributes using console application Pin
CPallini10-Jan-08 2:37
mveCPallini10-Jan-08 2:37 
GeneralScanline problem in bitmap Pin
trioum10-Jan-08 0:39
trioum10-Jan-08 0:39 
GeneralRe: Scanline problem in bitmap Pin
CPallini10-Jan-08 2:42
mveCPallini10-Jan-08 2:42 
QuestionRe: Scanline problem in bitmap Pin
Mark Salsbery10-Jan-08 7:13
Mark Salsbery10-Jan-08 7:13 
GeneralRe: Scanline problem in bitmap Pin
trioum10-Jan-08 17:58
trioum10-Jan-08 17:58 
GeneralRe: Scanline problem in bitmap Pin
Mark Salsbery11-Jan-08 12:58
Mark Salsbery11-Jan-08 12:58 
General[Message Deleted] Pin
trioum11-Jan-08 18:42
trioum11-Jan-08 18:42 
GeneralRe: Scanline problem in bitmap Pin
Mark Salsbery12-Jan-08 7:32
Mark Salsbery12-Jan-08 7:32 
GeneralLockWindowUpdate & Vista Pin
baerten9-Jan-08 23:54
baerten9-Jan-08 23:54 
GeneralUsing handle between two process Pin
ashtwin9-Jan-08 23:29
ashtwin9-Jan-08 23:29 
GeneralRe: Using handle between two process Pin
Maxwell Chen9-Jan-08 23:37
Maxwell Chen9-Jan-08 23:37 
GeneralRe: Using handle between two process Pin
CPallini9-Jan-08 23:47
mveCPallini9-Jan-08 23:47 
GeneralRe: Using handle between two process Pin
Maxwell Chen10-Jan-08 0:19
Maxwell Chen10-Jan-08 0:19 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 0:36
mveCPallini10-Jan-08 0:36 
GeneralRe: Using handle between two process Pin
Maxwell Chen10-Jan-08 3:48
Maxwell Chen10-Jan-08 3:48 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 3:58
mveCPallini10-Jan-08 3:58 

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.