Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: .obj file Pin
ShilpiP26-Jul-07 21:22
ShilpiP26-Jul-07 21:22 
GeneralRe: .obj file Pin
CPallini26-Jul-07 21:47
mveCPallini26-Jul-07 21:47 
GeneralRe: .obj file Pin
ShilpiP26-Jul-07 23:01
ShilpiP26-Jul-07 23:01 
GeneralRe: .obj file Pin
CPallini26-Jul-07 23:13
mveCPallini26-Jul-07 23:13 
GeneralRe: .obj file Pin
ShilpiP26-Jul-07 23:22
ShilpiP26-Jul-07 23:22 
GeneralRe: .obj file Pin
Shouvik Das26-Jul-07 23:48
Shouvik Das26-Jul-07 23:48 
GeneralRe: .obj file Pin
CPallini27-Jul-07 0:03
mveCPallini27-Jul-07 0:03 
QuestionCreating xml file Pin
Maynka26-Jul-07 18:57
Maynka26-Jul-07 18:57 
I am writing the following code for creating the XML file.

HRESULT hr;
IXMLDOMDocumentPtr pXMLDoc = NULL;
CoInitialize(NULL);
hr=pXMLDoc.CreateInstance("msxml2.domdocument");
IXMLDOMNodePtr pRootNode= NULL;
IXMLDOMNodePtr pRecNode= NULL;
IXMLDOMNodePtr pRecNode1= NULL;
IXMLDOMElementPtr pElement=NULL;
_variant_t varNodeType((short)MSXML2::NODE_ELEMENT);
hr= pXMLDoc->createNode(varNodeType,
_T("RTCS"), _T("Remote Target Control System"),&pRootNode);
hr=pXMLDoc->createElement(_T("Connection"),&pElement);
IXMLDOMAttributePtr pRecIdAttr = NULL;
IXMLDOMNamedNodeMapPtr pattributeMap;
hr=pXMLDoc->createAttribute(_T("connect"),&pRecIdAttr);
hr=pRecIdAttr->put_nodeTypedValue(_variant_t(_T("connect_val")));
hr=pElement->get_attributes(&pattributeMap);
hr=pattributeMap->setNamedItem(pRecIdAttr,&pRecNode);
hr=pXMLDoc->appendChild(pRootNode,&pRecNode);

but i am not able to see the child node created in the xml file.Only root node is created:


The xml file i want to create is:

?xml version="1.0"?>
<rtcs name="Remote Target Control System">
<Connection connect= "connectval" ipaddress = "ip_addresss" Port = "port_number"/>
<Logging Directory="path" Level="level" ComPort="port_number" Maxsize="max_size"/>
<Video BitRate="bitrate" InputType="input_type" Preview="preview" FrameDrop="frame_drop" Dumping ="dump"/>
<IR directory_path="dir_path"/>
</rtcs


Regards,

AnswerRe: Creating xml file Pin
Christian Graus26-Jul-07 19:42
protectorChristian Graus26-Jul-07 19:42 
QuestionVC++ 6.0 with Sql Server Pin
shakumar_2226-Jul-07 18:53
shakumar_2226-Jul-07 18:53 
AnswerRe: VC++ 6.0 with Sql Server Pin
mandanani26-Jul-07 19:44
mandanani26-Jul-07 19:44 
GeneralRe: VC++ 6.0 with Sql Server Pin
shakumar_2226-Jul-07 21:18
shakumar_2226-Jul-07 21:18 
QuestionLPCTSTR and HRESULT Pin
George_George26-Jul-07 18:53
George_George26-Jul-07 18:53 
AnswerRe: LPCTSTR and HRESULT Pin
ShilpiP26-Jul-07 19:30
ShilpiP26-Jul-07 19:30 
GeneralRe: LPCTSTR and HRESULT Pin
George_George26-Jul-07 20:47
George_George26-Jul-07 20:47 
GeneralRe: LPCTSTR and HRESULT Pin
ShilpiP26-Jul-07 21:34
ShilpiP26-Jul-07 21:34 
GeneralRe: LPCTSTR and HRESULT Pin
George_George26-Jul-07 21:44
George_George26-Jul-07 21:44 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das26-Jul-07 23:58
Shouvik Das26-Jul-07 23:58 
GeneralRe: LPCTSTR and HRESULT Pin
George_George27-Jul-07 20:20
George_George27-Jul-07 20:20 
GeneralRe: LPCTSTR and HRESULT Pin
Iain Clarke, Warrior Programmer27-Jul-07 1:29
Iain Clarke, Warrior Programmer27-Jul-07 1:29 
GeneralRe: LPCTSTR and HRESULT Pin
George_George27-Jul-07 20:21
George_George27-Jul-07 20:21 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das29-Jul-07 18:37
Shouvik Das29-Jul-07 18:37 
GeneralRe: LPCTSTR and HRESULT Pin
George_George29-Jul-07 18:55
George_George29-Jul-07 18:55 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das29-Jul-07 19:13
Shouvik Das29-Jul-07 19:13 
GeneralRe: LPCTSTR and HRESULT Pin
George_George29-Jul-07 19:18
George_George29-Jul-07 19:18 

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.