[xml] Unwanted Build ?



Hi,

I have successfully build the libraries for STLinux. Thanks for the wonderful library and people who dedicated their time in building the library. The build size is huge. We are using xml for IPC data transfer. I just use only the node libraries. Can I avoid having rest of them eliminated from the build. Since space is very important in the system we use, I guess it matters the fact.

        Can anyone please help.
        The following is the code snipped which we use,

on the sending side,

      doc = xmlNewDoc(BAD_CAST "1.0");
       inno = xmlNewNode(NULL, BAD_CAST "innoxml");
       xmlNewChild(inno,NULL,"command",pmsg->command);
       tpm = pmsg->hd;
       while( tpm ) {
               xmlNewChild(inno,NULL,tpm->key,tpm->value);
               tpm = tpm->next;
       }
       xmlDocSetRootElement(doc, inno);
       xmlDocDumpMemory(doc, &xmlbuff, &buffersize);
       SSendBMessage(pmsg->sh,xmlbuff,buffersize);
       xmlFree(xmlbuff);
       xmlFreeDoc(doc);

on the receiving side,

   rdoc = xmlReadMemory(bufdata,buflen,"xmlbuff.xml",NULL,0);
   cur = xmlDocGetRootElement(rdoc);
   cur = cur->xmlChildrenNode;
   while (cur != NULL){
       xmlChar *key;
       if( strcmp(cur->name,"text") != 0 ) {
if( (stmp->command == NULL) && strcmp(cur->name,"command") == 0 ){ key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                       stmp->command = key;
                       cur = cur->next;
                       continue;
               }
               if( strcmp(cur->name,"text") != 0 ){
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                       AddMessageParam(stmp,cur->name,key);
                       xmlFree(key);
               }
       }
       cur = cur->next;
   }
   xmlFreeDoc(rdoc);

Can anyone please help.

Thanks.

Kannaiyan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]