xmldocument动态创建不能成功读出数据?
拖个XmlDocument1控件到窗口然后调用如下代码就能成功
XMLDocument1->LoadFromFile("C:\\mms.xml"); XMLDocument1->Active=true; ShowMessage(AnsiString (XMLDocument1->DocumentElement->ChildNodes->Nodes[0]->Text));
TXMLDocument *XMLDocument1; XMLDocument1=new TXMLDocument("C:\\mms.xml"); XMLDocument1->Active=true; ShowMessage(AnsiString (XMLDocument1->DocumentElement->ChildNodes->Nodes[0]->Text));
_di_IXMLDocument xml = LoadXMLDocument(WideString("C:\\mms.xml"));xml->Active = true;ShowMessage(AnsiString(xml->DocumentElement->ChildNodes->Nodes[0]->Text));