Index: code/branches/FICN/src/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/CMakeLists.txt	(revision 479)
+++ code/branches/FICN/src/CMakeLists.txt	(revision 480)
@@ -7,4 +7,5 @@
 ADD_SUBDIRECTORY(orxonox)
 ADD_SUBDIRECTORY(audio)
+ADD_SUBDIRECTORY(tinyxml)
 
 # xml gets handled by loader
Index: code/branches/FICN/src/loader/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/loader/CMakeLists.txt	(revision 479)
+++ code/branches/FICN/src/loader/CMakeLists.txt	(revision 480)
@@ -4,10 +4,9 @@
 SET( LOADER_SRC_FILES
   LevelLoader.cc
-  #../xml/xmlParser.cc
-  ../tinyxml/tinystr.cc
-  ../tinyxml/tinyxml.cc
-  ../tinyxml/tinyxmlerror.cc
-  ../tinyxml/tinyxmlparser.cc
 )
 
 ADD_LIBRARY(loader SHARED ${LOADER_SRC_FILES})
+
+TARGET_LINK_LIBRARIES( loader
+  xml
+)
Index: code/branches/FICN/src/loader/LevelLoader.cc
===================================================================
--- code/branches/FICN/src/loader/LevelLoader.cc	(revision 479)
+++ code/branches/FICN/src/loader/LevelLoader.cc	(revision 480)
@@ -5,4 +5,6 @@
 #include "tinyxml/tinyxml.h"
 #include "orxonox/core/IdentifierIncludes.h"
+#include "orxonox/core/Error.h"
+#include "orxonox/objects/BaseObject.h"
 
 using namespace std;
@@ -11,12 +13,14 @@
 {
 
-LevelLoader::LevelLoader(string file, string dir)
-{
+LevelLoader::LevelLoader(string file, string path)
+{
+	valid_ = false;
+	
 	// Load XML level file
-	dir.append("/");
-	dir.append(file);	
+	path.append("/");
+	path.append(file);	
 	
 	// Open xml file
-	TiXmlDocument doc(file);
+	doc.LoadFile(path);
 
 	// Check if file was loaded
@@ -24,8 +28,6 @@
 	{
 		TiXmlHandle hDoc(&doc);
-		TiXmlHandle hRoot(0);	
-
+		TiXmlHandle hRoot(0);		
 		TiXmlElement* pElem;
-		
 
 		// Check for root element
@@ -35,4 +37,5 @@
 			// Set root element
 			hRoot = TiXmlHandle(pElem);
+			rootElement = hRoot.Element();
 
 			// Set level description
@@ -44,45 +47,83 @@
 			
 			// Set level name
-			pElem = hRoot.Element();
-			name_ = pElem->Attribute("name");
-			image_ = pElem->Attribute("image");
+			name_ = rootElement->Attribute("name");
+			image_ = rootElement->Attribute("image");
+			
+			valid_ = true;
+		}
+		else
+		{
+			orxonox::Error("Level file has no valid root node");
+		}	
+	}
+	else
+	{
+		orxonox::Error("Could not load level file ");
+	}	
+}
+
+	void LevelLoader::loadLevel()
+	{
+		if (valid_)
+		{
+			TiXmlElement* loadElem;
+			TiXmlElement* worldElem;
+			TiXmlElement* tElem;
+			TiXmlNode* tNode;
+			
 			
 			// Set loading screen
-			pElem = hRoot.FirstChild("loading").Element();
-			if (pElem)
+			loadElem = rootElement->FirstChildElement("loading");
+			if (loadElem)
 			{
 				// Set background
-				pElem = hRoot.FirstChild("loading").FirstChild("background").Element();
-				if (pElem)
+				tElem = loadElem->FirstChildElement("background");
+				if (tElem)
 				{
-					loadingBackgroundColor_ = pElem->Attribute("color");
-					loadingBackgroundImage_ = pElem->Attribute("image");
+					loadingBackgroundColor_ = tElem->Attribute("color");
+					loadingBackgroundImage_ = tElem->Attribute("image");
 				}
 				// Set bar
-				pElem = hRoot.FirstChild("loading").FirstChild("bar").Element();
-				if (pElem)
+				tElem = loadElem->FirstChildElement("bar");
+				if (tElem)
 				{
-					loadingBarImage_ = pElem->Attribute("image");;
-					loadingBarTop_ = pElem->Attribute("top");
-					loadingBarLeft_ = pElem->Attribute("left");
-					loadingBarWidth_ = pElem->Attribute("width");
-					loadingBarHeight_ = pElem->Attribute("height");
+					loadingBarImage_ = tElem->Attribute("image");;
+					loadingBarTop_ = tElem->Attribute("top");
+					loadingBarLeft_ = tElem->Attribute("left");
+					loadingBarWidth_ = tElem->Attribute("width");
+					loadingBarHeight_ = tElem->Attribute("height");
 				}
+				showLoadingScreen();
 			}
-						
-			
-		}
-		else
-		{
-			std::string err = "Level file has no valid root node";
-			std::cout << err << std::endl;
-		}	
-	}
-	else
-	{
-		std::string err = "Could not load level file ";
-		err.append(file); 
-		std::cout << err << std::endl;
-	}	
+			
+			// Load audio
+			// TODO
+			
+			// Load scripts
+			// TODO
+			
+			// Load world
+			worldElem = rootElement->FirstChildElement("world");
+			if (worldElem)
+			{	
+				tNode = 0;
+				while( tNode = worldElem->IterateChildren( tNode ) )
+				{
+					tElem = tNode->ToElement();
+					orxonox::BaseObject* obj = orxonox::ID(tElem->Value())->fabricate();
+					obj->loadParams(tElem);
+				}			
+			}
+			
+			std::cout << "Loading finished!\n\n\n\n\n";						
+		}
+	}
+	
+	void LevelLoader::showLoadingScreen()
+	{
+		std::cout << "\n\n\nThis is Orxonox\nthe hottest 3D action shooter ever to exist\n\n\n";
+		std::cout << "Level: " << name() << "\nDescription:" << description() << "\nImage:"<<image()<<"\n\n\n";
+		std::cout << "Backgroundcolor: " << loadingBackgroundColor_ << "\nBackgroundimage:" << loadingBackgroundImage_ << "\n\n\n";
+	}
 	
 	
@@ -130,5 +171,5 @@
 */
 
-}
+
 
 LevelLoader::~LevelLoader()
@@ -154,9 +195,4 @@
 }
 
-void LevelLoader::showLoadingScreen()
-{
-	cout << "\n\n\nThis is Orxonox\nthe hottest 3D action shooter ever to exist\n\n\n";
-	cout << "Level: " << name() << "\nDescription:" << description() << "\nImage:"<<image()<<"\n\n\n";
-}
 
 /*
Index: code/branches/FICN/src/loader/LevelLoader.h
===================================================================
--- code/branches/FICN/src/loader/LevelLoader.h	(revision 479)
+++ code/branches/FICN/src/loader/LevelLoader.h	(revision 480)
@@ -24,17 +24,8 @@
 	{
 	private:
-		/*
-		// XML Nodes 
-		XMLNode rootNode;
-		XMLNode loadingScreenNode;
-		XMLNode worldNode;
-		XMLNode audioNode;
-		XMLNode scriptsNode;
-		*/
 		// Level information
 		std::string name_;
 		std::string description_;
 		std::string image_;
-		
 		std::string loadingBackgroundColor_;
 		std::string loadingBackgroundImage_;
@@ -44,5 +35,9 @@
 		std::string loadingBarWidth_;
 		std::string loadingBarHeight_;
+		
+		bool valid_;
 			
+		TiXmlDocument doc;
+		TiXmlElement* rootElement;	
 	public:
 
@@ -52,4 +47,5 @@
 		
 		void showLoadingScreen();
+		void loadLevel();
 		
 		// Getters
Index: code/branches/FICN/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/orxonox/CMakeLists.txt	(revision 479)
+++ code/branches/FICN/src/orxonox/CMakeLists.txt	(revision 480)
@@ -32,4 +32,5 @@
   objects
   weapon
+  xml
 )
 
Index: code/branches/FICN/src/orxonox/core/OrxonoxClass.h
===================================================================
--- code/branches/FICN/src/orxonox/core/OrxonoxClass.h	(revision 479)
+++ code/branches/FICN/src/orxonox/core/OrxonoxClass.h	(revision 480)
@@ -92,5 +92,4 @@
             inline const bool isVisible() const { return this->bVisible_; }
 
-			//virtual void loadParams(TIXMLNode n);
 
         private:
Index: code/branches/FICN/src/orxonox/objects/BaseObject.cc
===================================================================
--- code/branches/FICN/src/orxonox/objects/BaseObject.cc	(revision 479)
+++ code/branches/FICN/src/orxonox/objects/BaseObject.cc	(revision 480)
@@ -13,3 +13,4 @@
     {
     }
+    
 }
Index: code/branches/FICN/src/orxonox/objects/BaseObject.h
===================================================================
--- code/branches/FICN/src/orxonox/objects/BaseObject.h	(revision 479)
+++ code/branches/FICN/src/orxonox/objects/BaseObject.h	(revision 480)
@@ -11,4 +11,6 @@
             BaseObject();
             virtual ~BaseObject();
+			virtual void loadParams(TiXmlElement* xmlElem) {}
+            
     };
 }
Index: code/branches/FICN/src/orxonox/objects/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/orxonox/objects/CMakeLists.txt	(revision 479)
+++ code/branches/FICN/src/orxonox/objects/CMakeLists.txt	(revision 480)
@@ -9,2 +9,6 @@
 
 ADD_LIBRARY(objects SHARED ${OBJECTS_SRC_FILES})
+
+TARGET_LINK_LIBRARIES( objects
+  xml
+)
Index: code/branches/FICN/src/orxonox/objects/test1.cc
===================================================================
--- code/branches/FICN/src/orxonox/objects/test1.cc	(revision 479)
+++ code/branches/FICN/src/orxonox/objects/test1.cc	(revision 480)
@@ -2,4 +2,5 @@
 #include "test2.h"
 #include "test3.h"
+#include "../../tinyxml/tinyxml.h"
 
 namespace orxonox
@@ -66,3 +67,8 @@
         this->usefullClass3_ = identifier;
     }
+    
+    void Test1::loadParams(TiXmlElement* xmlElem)
+    {
+    	std::cout<< xmlElem->GetText()<<std::endl;
+    }
 }
Index: code/branches/FICN/src/orxonox/objects/test1.h
===================================================================
--- code/branches/FICN/src/orxonox/objects/test1.h	(revision 479)
+++ code/branches/FICN/src/orxonox/objects/test1.h	(revision 480)
@@ -5,4 +5,5 @@
 #include "Tickable.h"
 #include "test3.h"
+#include "../../tinyxml/tinyxml.h"
 
 namespace orxonox
@@ -22,4 +23,6 @@
             void setUsefullClass2(Identifier* identifier);
             void setUsefullClassOfTypeTest3(Identifier* identifier);
+            
+            void loadParams(TiXmlElement* xmlElem);
 
         private:
Index: code/branches/FICN/src/orxonox/orxonox.cc
===================================================================
--- code/branches/FICN/src/orxonox/orxonox.cc	(revision 479)
+++ code/branches/FICN/src/orxonox/orxonox.cc	(revision 480)
@@ -218,9 +218,5 @@
   {
     //TODO: start modules
-    ogre_->startRender();
-    auMan_ = new audio::AudioManager();
-    // load this file from config
-    string levelFile = "sample.oxw";
-    //loader_ = new loader::LevelLoader(levelFile);
+
     //TODO: run engine
   }
@@ -339,6 +335,12 @@
   void Orxonox::createScene(void)
   {
+	// Init audio
     auMan_ = new audio::AudioManager();
-
+    
+    // load this file from config
+    loader_ = new loader::LevelLoader("sample.oxw");
+    loader_->loadLevel();
+
+	/*
     auMan_->ambientAdd("a1");
     auMan_->ambientAdd("a2");
@@ -346,7 +348,5 @@
                                 //auMan->ambientAdd("ambient1");
     auMan_->ambientStart();
-
-    string levelFile = "sp_level_moonstation.oxw";
-//       loader::LevelLoader* loader = new loader::LevelLoader(levelFile);
+	*/
   }
 
