A
A
akamajoris2013-11-24 03:33:41
C++ / C#
akamajoris, 2013-11-24 03:33:41

Why doesn't XML parsing work in a loop (C++ Builder)?

Now I am writing a client-server application, the choice fell on XE C ++ Builder.
The server uses the IdTCPServer component.

void __fastcall TForm1::IdTCPServer1Execute(TIdContext *AContext)
{
... // прием данных в переменную Message.
// в качестве примера вместо полученных данных пробую указать простую строку
   ShowMessage("Start"); // выполняется
  XMLDocument1->XML->Text = "<user><name>Suhrob</name><name>Samiev</name><smth>Sur</smth></user>";
  XMLDocument1->Active = true;
  ShowMessage("Stop"); // уже не выполняется
} // IdTCPServer1Execute

But there are no errors or warnings.
I tried this code in a simple for loop, everything works fine there. Tell CHADNT.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
llCorvinuSll, 2013-11-25
@llCorvinuSll

and if you don't set XMLDocument1->Active = true;
and also try
http://docwiki.embarcadero.com/Libraries/XE3/en/Xml.XMLDoc.TXMLDocument.AsyncLoadState
Generally speaking, the Builder is not strong, but where do you have XMLDocument1 declared, and whether it is used in the future. If it is not a class field, then it would be nice to release it when you are done with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question