I am trying to get values from an XML document using XDocument and XElement. I am trying to get three values, however when I try to return them, they are merged together as one value. Here is the XML I am searching:\[code\]<create_maint_traveler> <Paths> <outputPath value="http://stackoverflow.com/questions/14447819/D:/Intercim/DNC_Share/itcm/DataInput/MCDHeaderDrop/" /> <outputPath_today value="http://stackoverflow.com/questions/14447819/D:/Intercim/DNC_Share/itcm/DataInput/Today/" /> <log value="http://stackoverflow.com/questions/14447819/D:/Intercim/DNC_Share/itcm/Log/CreateMaintLog.log" /> </Paths></create_maint_traveler>\[/code\]Here is how I am querying the values:\[code\]XDocument config = XDocument.Load(XML); foreach (XElement node in config.Root.Elements("Paths")) { if (node.Name == "outputPath") outputPath = node.Value; if (node.Name == "outputPath_today") outputPath = node.Value; if (node.Name == "log") outputPath = node.Value; }\[/code\]When I output to a file, i find that the returned value is \[code\]D:\Intercim\DNC_Share\itcm\DataInput\MCDHeaderDrop\D:\Intercim\DNC_Share\itcm\DataInput\Today\D:\Intercim\DNC_Share\itcm\Log\CreateMaintLog.log\[/code\]Or there will be nothing returned. I had the values in the XML file outside of the tags before which returned the one long value. I am confused about how to return the outputPath, outputPath_today and log values seperatly. Any help is appreciated.