Index: branches/ATMSDriver/src/atmsdriver/network/model/FEPLine.java
===================================================================
--- branches/ATMSDriver/src/atmsdriver/network/model/FEPLine.java	(revision 75)
+++ branches/ATMSDriver/src/atmsdriver/network/model/FEPLine.java	(revision 76)
@@ -2,4 +2,8 @@
 
 import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
 
 /** An FEPLine is a simulated line of communication from the FEP to 
@@ -37,3 +41,66 @@
         this.scheduleSeq = scheduleSeq;
     }
+    
+    public void toXML(Element currElem)
+    {
+        Document theDoc = currElem.getOwnerDocument();
+        
+        Element lineElement = theDoc.createElement(XML_TAGS.LINE.tag);
+        currElem.appendChild(lineElement);
+        
+        Element lineNumElement = theDoc.createElement(XML_TAGS.LINE_NUM.tag);
+        lineNumElement.appendChild(theDoc.createTextNode(String.valueOf(this.lineNum)));
+        lineElement.appendChild(lineNumElement);
+        
+        Element countElement = theDoc.createElement(XML_TAGS.COUNT.tag);
+        countElement.appendChild(theDoc.createTextNode(String.valueOf(this.count)));
+        lineElement.appendChild(countElement);
+        
+        Element scheduleElement = theDoc.createElement(XML_TAGS.SCHEDULE.tag);
+        scheduleElement.appendChild(theDoc.createTextNode(String.valueOf(this.schedule)));
+        lineElement.appendChild(scheduleElement);
+        
+        Element lineInfoElement = theDoc.createElement(XML_TAGS.LINE_INFO.tag);
+        lineInfoElement.appendChild(theDoc.createTextNode(String.valueOf(this.lineInfo)));
+        lineElement.appendChild(lineInfoElement);
+        
+        Element systemKeyElement = theDoc.createElement(XML_TAGS.SYSTEM_KEY.tag);
+        systemKeyElement.appendChild(theDoc.createTextNode(String.valueOf(this.systemKey)));
+        lineElement.appendChild(systemKeyElement);
+        
+        Element globalSeqElement = theDoc.createElement(XML_TAGS.GLOBAL_SEQ.tag);
+        globalSeqElement.appendChild(theDoc.createTextNode(String.valueOf(this.globalSeq)));
+        lineElement.appendChild(globalSeqElement);
+        
+        Element scheduleSeqElement = theDoc.createElement(XML_TAGS.SCHEDULE_SEQ.tag);
+        scheduleSeqElement.appendChild(theDoc.createTextNode(String.valueOf(this.scheduleSeq)));
+        lineElement.appendChild(scheduleSeqElement);
+        
+        Element stationsElement = theDoc.createElement(XML_TAGS.STATIONS.tag);
+        lineElement.appendChild(stationsElement);
+        for(LoopDetectorStation station : stations)
+        {
+            station.toXML(stationsElement);
+        }
+    }
+    
+    private static enum XML_TAGS
+    {
+        LINE("Line"),
+        LINE_NUM("Line_Num"),
+        STATIONS("Stations"),
+        COUNT("Count"),
+        SCHEDULE("Schedule"),
+        LINE_INFO("Line_Info"),
+        SYSTEM_KEY("System_Key"),
+        GLOBAL_SEQ("Global_Seq"),
+        SCHEDULE_SEQ("Schedule_Seq");
+        
+        String tag;
+        
+        private XML_TAGS(String n)
+        {
+            tag = n;
+        }
+    }
 }
Index: branches/ATMSDriver/src/atmsdriver/network/model/LoopDetector.java
===================================================================
--- branches/ATMSDriver/src/atmsdriver/network/model/LoopDetector.java	(revision 75)
+++ branches/ATMSDriver/src/atmsdriver/network/model/LoopDetector.java	(revision 76)
@@ -3,4 +3,6 @@
 import java.util.ArrayList;
 import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 /** A LoopDetector represents a single detector for a single lane in a network.
@@ -37,4 +39,22 @@
     }
     
+    private static enum XML_TAGS
+    {
+        LOOP_ID("Loop_ID"),
+        LOOP_LOCATION("Loop_Location"),
+        LANE_NUM("Lane_Num"),
+        VOL("Vol"),
+        SPD("Spd"),
+        OCC("Occ"),
+        LOOP("Loop");
+        
+        String tag;
+        
+        private XML_TAGS(String n)
+        {
+            tag = n;
+        }
+    }
+    
     /** 
      * Updates loop detector dynamic attributes.
@@ -49,3 +69,35 @@
         this.spd = spd;
     }
+    
+    public void toXML(Element currElem)
+    {
+        Document theDoc = currElem.getOwnerDocument();
+        
+        Element loopElement = theDoc.createElement(XML_TAGS.LOOP.tag);
+        currElem.appendChild(loopElement);
+        
+        Element loopIDElement = theDoc.createElement(XML_TAGS.LOOP_ID.tag);
+        loopIDElement.appendChild(theDoc.createTextNode(String.valueOf(this.loopID)));
+        loopElement.appendChild(loopIDElement);
+        
+        Element loopLocElement = theDoc.createElement(XML_TAGS.LOOP_LOCATION.tag);
+        loopLocElement.appendChild(theDoc.createTextNode(this.loopLocation));
+        loopElement.appendChild(loopLocElement);
+        
+        Element laneNumElement = theDoc.createElement(XML_TAGS.LANE_NUM.tag);
+        laneNumElement.appendChild(theDoc.createTextNode(String.valueOf(this.laneNum)));
+        loopElement.appendChild(laneNumElement);
+        
+        Element volElement = theDoc.createElement(XML_TAGS.VOL.tag);
+        volElement.appendChild(theDoc.createTextNode(String.valueOf(this.vol)));
+        loopElement.appendChild(volElement);
+        
+        Element occElement = theDoc.createElement(XML_TAGS.OCC.tag);
+        occElement.appendChild(theDoc.createTextNode(String.valueOf(this.occ)));
+        loopElement.appendChild(occElement);
+        
+        Element spdElement = theDoc.createElement(XML_TAGS.SPD.tag);
+        spdElement.appendChild(theDoc.createTextNode(String.valueOf(this.spd)));
+        loopElement.appendChild(spdElement);
+    }
 }
Index: branches/ATMSDriver/src/atmsdriver/network/model/LoopDetectorStation.java
===================================================================
--- branches/ATMSDriver/src/atmsdriver/network/model/LoopDetectorStation.java	(revision 75)
+++ branches/ATMSDriver/src/atmsdriver/network/model/LoopDetectorStation.java	(revision 76)
@@ -2,4 +2,6 @@
 
 import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 /** A LoopDetectorStation is a simulation of a station in a traffic network.
@@ -48,4 +50,78 @@
     }
     
+    private static enum XML_TAGS
+    {
+        STATION("Station"),
+        LDS_ID("LDS_ID"),
+        LINE_NUM("Line_Num"),
+        DROP("Drop"),
+        LOOPS("Loops"),
+        LOCATION("Location"),
+        POST_MILE("Post_Mile"),
+        DIRECTION("Direction"),
+        FREEWAY("Freeway"),
+        ML_TOT_VOL("ML_Tot_Vol"),
+        OPP_TOT_VOL("Opp_Tot_Vol");
+        
+        String tag;
+        
+        private XML_TAGS(String n)
+        {
+            tag = n;
+        }
+    }
+    
+    public void toXML(Element currElem)
+    {
+        Document theDoc = currElem.getOwnerDocument();
+        
+        Element stationElement = theDoc.createElement(XML_TAGS.STATION.tag);
+        currElem.appendChild(stationElement);
+        
+        Element ldsIDElement = theDoc.createElement(XML_TAGS.LDS_ID.tag);
+        ldsIDElement.appendChild(theDoc.createTextNode(String.valueOf(this.ldsID)));
+        stationElement.appendChild(ldsIDElement);
+        
+        Element lineNumElement = theDoc.createElement(XML_TAGS.LINE_NUM.tag);
+        lineNumElement.appendChild(theDoc.createTextNode(String.valueOf(this.lineNum)));
+        stationElement.appendChild(lineNumElement);
+        
+        Element dropElement = theDoc.createElement(XML_TAGS.DROP.tag);
+        dropElement.appendChild(theDoc.createTextNode(String.valueOf(this.drop)));
+        stationElement.appendChild(dropElement);
+        
+        Element locationElement = theDoc.createElement(XML_TAGS.LOCATION.tag);
+        locationElement.appendChild(theDoc.createTextNode(this.location));
+        stationElement.appendChild(locationElement);
+        
+        Element postMileElement = theDoc.createElement(XML_TAGS.POST_MILE.tag);
+        postMileElement.appendChild(theDoc.createTextNode(String.valueOf(this.postmile)));
+        stationElement.appendChild(postMileElement);
+        
+        Element directionElement = theDoc.createElement(XML_TAGS.DIRECTION.tag);
+        directionElement.appendChild(theDoc.createTextNode(this.direction.name));
+        stationElement.appendChild(directionElement);
+        
+        Element freewayElement = theDoc.createElement(XML_TAGS.FREEWAY.tag);
+        freewayElement.appendChild(theDoc.createTextNode(String.valueOf(this.freeway)));
+        stationElement.appendChild(freewayElement);
+        
+        Element mlElement = theDoc.createElement(XML_TAGS.ML_TOT_VOL.tag);
+        mlElement.appendChild(theDoc.createTextNode(String.valueOf(this.MLTotVol)));
+        stationElement.appendChild(mlElement);
+        
+        Element oppElement = theDoc.createElement(XML_TAGS.OPP_TOT_VOL.tag);
+        oppElement.appendChild(theDoc.createTextNode(String.valueOf(this.OppTotVol)));
+        stationElement.appendChild(oppElement);
+        
+        Element loopsElement = theDoc.createElement(XML_TAGS.LOOPS.tag);
+        stationElement.appendChild(loopsElement);
+        
+        for(LoopDetector loop : loops)
+        {
+            loop.toXML(loopsElement);
+        }
+    }
+    
     /**
      * Enum for freeway direction.
Index: branches/ATMSDriver/src/atmsdriver/network/model/Network.java
===================================================================
--- branches/ATMSDriver/src/atmsdriver/network/model/Network.java	(revision 75)
+++ branches/ATMSDriver/src/atmsdriver/network/model/Network.java	(revision 76)
@@ -3,5 +3,20 @@
 import atmsdriver.NetworkReader;
 import java.io.File;
+import java.io.FileWriter;
+import java.io.StringWriter;
+import java.io.Writer;
 import java.util.ArrayList;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 /**
@@ -11,9 +26,59 @@
 public class Network {
     final private ArrayList<FEPLine> lines;
+    final private File networkFile;
     
-    public Network(File LDSFile, File loopFile)
+    public Network(File LDSFile, File loopFile, File networkFile)
     {
         lines = (ArrayList<FEPLine>) 
                 new NetworkReader(LDSFile, loopFile).getFEPLines();
+        this.networkFile = networkFile;
+    }
+    
+    public void toXML() throws Exception
+    {
+        try {
+            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            Document theDoc = builder.newDocument();
+            
+            Element networkElement = theDoc.createElement(XML_TAGS.NETWORK.tag);
+            theDoc.appendChild(networkElement);
+            
+            for(FEPLine line : lines)
+            {
+                line.toXML(networkElement);
+            }
+            
+            Transformer tf = TransformerFactory.newInstance().newTransformer();
+            
+            tf.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            tf.setOutputProperty(OutputKeys.INDENT, "yes");
+            tf.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
+            
+            Writer out = new StringWriter();
+            tf.transform(new DOMSource(theDoc), new StreamResult(out));
+            String xml = out.toString();
+            out.close();
+            
+            Writer fileWr = new FileWriter(networkFile);
+            fileWr.write(xml);
+            fileWr.close();
+            
+            
+        } catch (ParserConfigurationException ex) {
+            Logger.getLogger(Network.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+    
+    private static enum XML_TAGS
+    {
+        NETWORK("Network");
+        
+        String tag;
+        
+        private XML_TAGS(String n)
+        {
+            tag = n;
+        }
     }
 }
Index: branches/ATMSDriver/src/atmsdriver/NetworkReader.java
===================================================================
--- branches/ATMSDriver/src/atmsdriver/NetworkReader.java	(revision 75)
+++ branches/ATMSDriver/src/atmsdriver/NetworkReader.java	(revision 76)
@@ -64,5 +64,5 @@
         ArrayList<Integer> lineNums = new ArrayList<>();
         
-        System.out.println(sc.nextLine()); // skip first line
+        sc.nextLine(); // skip first line
         
         while(sc.hasNext())
@@ -75,5 +75,4 @@
             {
                 lineNums.add(lineNum);
-                System.out.println("Adding line: " + lineNum);
             }
        
@@ -100,5 +99,4 @@
             {
                 stnNums.add(stnNum);
-                System.out.println("Adding stn " + stnNum + " to line " + theLine);
             }
             
@@ -235,5 +233,5 @@
         /** GRABS FROM CURRENT TO END OF LINE */
         sc.useDelimiter("\\z"); 
-        String loc = sc.next();
+        String loc = sc.next().trim();
         sc.close();
         return loc;
@@ -254,5 +252,5 @@
             if(ldsID == stnNum) // if we are on correct stn
             {
-                scLine.nextInt(); // skip line num
+                int lineNum = scLine.nextInt(); // skip line num
                 int drop = scLine.nextInt(); // drop num
                 scLine.nextInt(); // skip schedule
@@ -266,6 +264,5 @@
                 double postmile = scLine.nextDouble();
                 String ldsName = getLocation(strLine); /************* DOESNT GRAB WHOLE???? */////
-                System.out.println("LDSNAME: " + ldsName);
-                LDS = new LoopDetectorStation(stnNum, ldsID, drop, ldsName, detectors, fwy, dir, postmile);
+                LDS = new LoopDetectorStation(lineNum, ldsID, drop, ldsName, detectors, fwy, dir, postmile);
                 
                 break;
Index: branches/ATMSDriver/src/atmsdriver/ATMSDriver.java
===================================================================
--- branches/ATMSDriver/src/atmsdriver/ATMSDriver.java	(revision 75)
+++ branches/ATMSDriver/src/atmsdriver/ATMSDriver.java	(revision 76)
@@ -3,4 +3,6 @@
 import atmsdriver.network.model.Network;
 import java.io.File;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /** 
@@ -12,4 +14,5 @@
     final private String ldsFileName = "./lds_data/lookup_lds";
     final private String loopFileName = "./lds_data/lookup_loop";
+    final private String networkFileName = "./networkFile.txt";
     final private Network network;
     
@@ -18,5 +21,11 @@
         File ldsFile = new File(ldsFileName);
         File loopFile = new File(loopFileName);
-        network = new Network(ldsFile, loopFile);
+        File networkFile = new File(networkFileName);
+        network = new Network(ldsFile, loopFile, networkFile);
+        try {
+            network.toXML();
+        } catch (Exception ex) {
+            Logger.getLogger(ATMSDriver.class.getName()).log(Level.SEVERE, null, ex);
+        }
     }
     
Index: branches/ATMSDriver/src/atmsdriver/NetworkWriter.java
===================================================================
--- branches/ATMSDriver/src/atmsdriver/NetworkWriter.java	(revision 75)
+++ 	(revision )
@@ -1,20 +1,0 @@
-package atmsdriver;
-
-/**
- *
- * @author John A. Torres
- * @version 09/10/2017
- */
-public class NetworkWriter {
-    final private String networkFile;
-    
-    public NetworkWriter(String networkFile)
-    {
-        this.networkFile = networkFile;
-    }
-    
-    public void writeToFile()
-    {
-        
-    }
-}
