/*   -*- coding: utf-8 -*-  */

/**********************************************************************
*
*  module   : Nlm
*  fichier  : NlmPmcCleanCorpus.c
*  Auteur   : Jacques DUCLOY
*  Date     : fin 2016
*
***********************************************************************/
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
#include "SxPath.h"

SxmlNode *docInput;

int main (int argc, char **argv) {
  while ((docInput=SxmlInputNextDocumentElement()))
    {  
      SxmlNode *pmcPart;
      SxmlNode *body;
      SxmlNode *back;
      pmcPart=SxmlGetFirstChildByTagName(docInput, "pmc");
      body=SxmlGetFirstChildByTagName(pmcPart, "body");
      if (body)SxmlFree(body);
      back=SxmlGetFirstChildByTagName(pmcPart, "back");
      if (back)SxmlFree(back);
      SxmlPrint (docInput);
      putchar('\n');
    }
   exit(EXIT_SUCCESS);
}
