diff --git a/src/nlsr_lsa.cpp b/src/nlsr_lsa.cpp
index f238bce..2a11e41 100644
--- a/src/nlsr_lsa.cpp
+++ b/src/nlsr_lsa.cpp
@@ -1,13 +1,16 @@
 #include<string>
 #include<iostream>
+#include<sstream>
 #include<algorithm>
 #include<cmath>
 #include<limits>
 
+#include "nlsr.hpp"
 #include "nlsr_lsa.hpp"
 #include "nlsr_npl.hpp"
 #include "nlsr_adjacent.hpp"
-#include "nlsr.hpp"
+#include "utility/nlsr_tokenizer.hpp"
+
 
 namespace nlsr
 {
@@ -40,7 +43,7 @@
     NameLsa::getNameLsaData()
     {
         string nameLsaData;
-        nameLsaData=origRouter + "|" + boost::lexical_cast<std::string>(lsType) + "|"
+        nameLsaData=origRouter + "|" + boost::lexical_cast<std::string>(1) + "|"
                     + boost::lexical_cast<std::string>(lsSeqNo) + "|"
                     + boost::lexical_cast<std::string>(lifeTime);
         nameLsaData+="|";
@@ -51,7 +54,36 @@
             nameLsaData+="|";
             nameLsaData+=(*it);
         }
-        return nameLsaData;
+        return nameLsaData+"|";
+    }
+
+    bool
+    NameLsa::initNameLsaFromContent(string content)
+    {
+        uint32_t numName=0;
+        nlsrTokenizer nt(content, "|");
+        origRouter=nt.getNextToken();
+        if(origRouter.empty())
+        {
+            return false;
+        }
+        try
+        {
+            lsType=boost::lexical_cast<uint8_t>(nt.getNextToken());
+            lsSeqNo=boost::lexical_cast<uint32_t>(nt.getNextToken());
+            lifeTime=boost::lexical_cast<uint32_t>(nt.getNextToken());
+            numName=boost::lexical_cast<uint32_t>(nt.getNextToken());
+        }
+        catch(std::exception &e)
+        {
+            return false;
+        }
+        for(int i=0; i<numName; i++)
+        {
+            string name=nt.getNextToken();
+            addNameToLsa(name);
+        }
+        return true;
     }
 
     std::ostream&
@@ -107,7 +139,7 @@
     {
         string corLsaData;
         corLsaData=origRouter + "|";
-        corLsaData+=(boost::lexical_cast<std::string>(lsType) + "|");
+        corLsaData+=(boost::lexical_cast<std::string>(3) + "|");
         corLsaData+=(boost::lexical_cast<std::string>(lsSeqNo) + "|");
         corLsaData+=(boost::lexical_cast<std::string>(lifeTime) + "|");
         corLsaData+=(boost::lexical_cast<std::string>(corRad) + "|");
@@ -115,6 +147,30 @@
         return corLsaData;
     }
 
+    bool
+    CorLsa::initCorLsaFromContent(string content)
+    {
+        nlsrTokenizer nt(content, "|");
+        origRouter=nt.getNextToken();
+        if(origRouter.empty())
+        {
+            return false;
+        }
+        try
+        {
+            lsType=boost::lexical_cast<uint8_t>(nt.getNextToken());
+            lsSeqNo=boost::lexical_cast<uint32_t>(nt.getNextToken());
+            lifeTime=boost::lexical_cast<uint32_t>(nt.getNextToken());
+            corRad=boost::lexical_cast<double>(nt.getNextToken());
+            corTheta=boost::lexical_cast<double>(nt.getNextToken());
+        }
+        catch(std::exception &e)
+        {
+            return false;
+        }
+        return true;
+    }
+
     std::ostream&
     operator<<(std::ostream& os, CorLsa& cLsa)
     {
@@ -166,7 +222,7 @@
     AdjLsa::getAdjLsaData()
     {
         string adjLsaData;
-        adjLsaData=origRouter + "|" + boost::lexical_cast<std::string>(lsType) + "|"
+        adjLsaData=origRouter + "|" + boost::lexical_cast<std::string>(2) + "|"
                    + boost::lexical_cast<std::string>(lsSeqNo) + "|"
                    + boost::lexical_cast<std::string>(lifeTime);
         adjLsaData+="|";
@@ -181,7 +237,46 @@
             adjLsaData+="|";
             adjLsaData+=boost::lexical_cast<std::string>((*it).getLinkCost());
         }
-        return adjLsaData;
+        return adjLsaData+"|";
+    }
+
+    bool
+    AdjLsa::initAdjLsaFromContent(string content)
+    {
+        uint32_t numLink=0;
+        nlsrTokenizer nt(content, "|");
+        origRouter=nt.getNextToken();
+        if(origRouter.empty())
+        {
+            return false;
+        }
+        try
+        {
+            lsType=boost::lexical_cast<uint8_t>(nt.getNextToken());
+            lsSeqNo=boost::lexical_cast<uint32_t>(nt.getNextToken());
+            lifeTime=boost::lexical_cast<uint32_t>(nt.getNextToken());
+            numLink=boost::lexical_cast<uint32_t>(nt.getNextToken());
+        }
+        catch(std::exception &e)
+        {
+            return false;
+        }
+        for(int i=0; i< numLink; i++)
+        {
+            try
+            {
+                string adjName=nt.getNextToken();
+                int connectingFace=boost::lexical_cast<int>(nt.getNextToken());
+                double linkCost=boost::lexical_cast<double>(nt.getNextToken());
+                Adjacent adjacent(adjName, connectingFace, linkCost, 0, 0);
+                addAdjacentToLsa(adjacent);
+            }
+            catch( std::exception &e )
+            {
+                return false;
+            }
+        }
+        return true;
     }
 
 
