/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/XML.h"

namespace morpheo              {
namespace behavioural          {

#undef  FUNCTION
#define FUNCTION "XML::get_body"
  string XML::get_body (void)
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    log_printf(FUNC,Behavioural,FUNCTION,"End");
    return _body;
  };

  string XML::get_body (uint32_t depth)
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");

    string body       = _body;
    string tabulation = indent(depth);

    body.insert(0,tabulation);
    for (size_t pos=body.find('\n',0); pos<body.length()-1; pos=body.find('\n',++pos))
      body.insert(++pos,tabulation);

    log_printf(FUNC,Behavioural,FUNCTION,"End");
    return body;
  };

}; // end namespace behavioural          
}; // end namespace morpheo              
