EDN Admin
Well-known member
Hey everyone. I have a very simple question (I hope) regarding reading an XML file. I have a file management app Im writing and I want to create an XML file that contains exceptions to a file move. The exception list is a simple directory
path and a list of extensions to exempt from that directory.
So, what I need to do is to enumerate through each extension listed under the directory path. My XML looks like this (its just an example by the way):
<?xml version="1.0" encoding="utf-8" ?><br/>
<DAC><br/>
<DirectoryName>c:<br/>
<Extention>.exe</Extention><br/>
<Extention>.txt</Extention><br/>
<Extention>.bat</Extention><br/>
</DirectoryName><br/>
<DirectoryName>\dataOrgFinanceMRptg<br/>
<Extention>.exe</Extention><br/>
<Extention>.txt</Extention><br/>
<Extention>.bat</Extention><br/>
</DirectoryName><br/>
</DAC>
Is there an easy LINQ query that will allow me to execute each Extention from within each DirectoryName? Or am I going about this the wrong way?
Thanks in advance for your help.
John.
View the full article
path and a list of extensions to exempt from that directory.
So, what I need to do is to enumerate through each extension listed under the directory path. My XML looks like this (its just an example by the way):
<?xml version="1.0" encoding="utf-8" ?><br/>
<DAC><br/>
<DirectoryName>c:<br/>
<Extention>.exe</Extention><br/>
<Extention>.txt</Extention><br/>
<Extention>.bat</Extention><br/>
</DirectoryName><br/>
<DirectoryName>\dataOrgFinanceMRptg<br/>
<Extention>.exe</Extention><br/>
<Extention>.txt</Extention><br/>
<Extention>.bat</Extention><br/>
</DirectoryName><br/>
</DAC>
Is there an easy LINQ query that will allow me to execute each Extention from within each DirectoryName? Or am I going about this the wrong way?
Thanks in advance for your help.
John.
View the full article