Using TXMLDocument dynamically

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Using TXMLDocument dynamically

Postby flextmro » Thu Jul 15, 2004 11:22 am

Is there any way to use TXMLDocument dynamically (not on a form or data module) in order to can parse and validate xml files???
flextmro
 

Dynamic TXMLDocument

Postby Sparky » Wed Sep 08, 2004 7:09 am

Here is part of some code I use to setup a dynamic TXMLDocument
It is used to handle incoming XML requests received on a TServerSocket.

void HandleRequest( void )
{
// XML document interface
_di_IXMLDocument xmlDoc;

try {
xmlDoc = NewXMLDocument();
if( xmlDoc ) {
// Setup the document with our XML request string
xmlDoc->XML->Text = XMLRequest;
xmlDoc->Active = true;
// XML parsed?
if ( xmlDoc->AsyncLoadState == 4 ) {
// Handle the request
}
}
}
catch( Exception &exception ) {
// Handle exception
}

}

Hope this helps you
Sparky
 


Return to Technical

Who is online

Users browsing this forum: No registered users and 17 guests

cron