C + + Builder call xml, always error

Category: C/C++ -> ActiveX/COM/DCOM Author: niqisiwole456852 Date: 2001-08-02 14:53:21
 
niqisiwole456852
2001-08-02 14:53:21
Code is as follows, please adequate guidance:

TXMLDocument * ConfigDoc;
_di_IXMLNode RootNode;

ConfigDoc = new TXMLDocument (" ");
ConfigDoc-> LoadFromFile (WideString (XmlFilePath));
ConfigDoc-> Active = true;

RootNode = ConfigDoc-> DocumentElement; ;/ / perform here on the error, always show
Access At Address 00000000 Process Stoped
I thought it was ConfigDoc New when there are problems, but I used MConfigDoc-> ; Xml read the loaded XML content, but also to see the XML
file content, which is why?

attached: I looked on the web related code, and I are the same.
qnc0313
2001-08-02 15:09:57
Last time I encountered this problem, it is estimated TXMLDocument components can not be created dynamically using the following method can be used later found to solve.

_di_IXMLDocument document;
document = LoadXMLDocument ("c: \ \ sms.xml");
document -> Active = true;
_di_IXMLNode node = document-> DocumentElement;

dwj5218
2001-08-02 15:19:13
I tried it, it seems to perform document = LoadXMLDocument ("c: \ \ sms.xml");
on the error. Still reported the same error.
but thank you for your answer.
qingwu5211
2001-08-02 15:32:28
I'm sorry, just made a mistake. Oh, I thought it was document.LoadFromFile ()
I checked the information, so that you can. Thank you. Access points.