private static void ProcessFolderNode( XmlElement root, String rootPathName )
{
foreach (XmlNode child in root.ChildNodes)
{
var element = child as XmlElement;
if (element != null)
{
if ("folder".Equals( child.Name ))
{
string name = element.GetAttribute( "name" );
String sourcePath = Path.Combine( rootPathName, name );
if (!Directory.Exists( sourcePath ))
Directory.CreateDirectory( sourcePath );
if (element.HasChildNodes)
ProcessFolderNode( element, sourcePath );
}
}
}
}