Article View: borland.public.cppbuilder.internet.web
Article #1558deleting a TXMLDocument
From: Fabi�n
Date: Wed, 15 Sep 2004 22:23
Date: Wed, 15 Sep 2004 22:23
38 lines
1840 bytes
1840 bytes
hi... I'm creating XMLDocuments dinamicaly, but I don't know how to delete
them. If I use: delete XMLDocument; the compiler throws an error.
Can someone helps me?
here is the code
void __fastcall TFMain::ServerSocket1ClientRead(TObject *Sender,
TCustomWinSocket *Socket)
{
AnsiString Texto, Evento, Room_id;
TXMLDocument *XMLDocument;
_di_IXMLDocument d;
_di_IXMLNode Nodo;
XMLDocument = new TXMLDocument("");
try
{
Texto = Socket->ReceiveText();
Memo1->Lines->Add(Texto);
try
{
XMLDocument->GetInterface(d);
d->LoadFromXML(WideString(Texto));
Nodo = XMLDocument->DocumentElement->ChildNodes->GetNode(0);
Evento = Nodo->Attributes[WideString("name")];
}
catch ( ... )
{
..........
........
XMLDocument->Active = false; //I don't know if I need it
//delete XMLDocument; //this trows an error
}
Technical Details
Message-ID:
<4148c0b5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: feeec,857cefac094b3c55,start X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Fabi�n" <fabianfierro@hotmail.com> From: "Fabi�n" <fabianfierro@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.web Subject: deleting a TXMLDocument Date: Wed, 15 Sep 2004 19:23:00 -0300 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 200.55.94.113 Message-ID: <4148c0b5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1095286965 200.55.94.113 (15 Sep 2004 15:22:45 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail