View Single Post
Old Jul 25th, 2007, 2:09 PM   #1
joel_garrison
Newbie
 
Join Date: Jul 2007
Posts: 2
Rep Power: 0 joel_garrison is on a distinguished road
can anyone create a program that...

Hi,
My Name is Joel Garrison

I was wondering if anyone could create a program that will take file names and create a XMl document, details follow


I need to take the following File names which are always standard
CSD-[prefix]_[Segence#]_[line name].tap

Each one of these files is in a different directory with basicly the same name but without the CSD- in front.

I need to grab every one of these file names in each dir and Xport them into the XML file that looks like the following

Quote:
<?xml version="1.0"?>
<segd21-tape vsn="[output tape#">
<line id="[prefix]_[linename]" seq="[Sequence#]">
<segd-image file="[prefix]_[Segence#]_[line name]/CSD-[prefix]_[Segence#]_[line name].tap"/>
</line>
</segd21-tape>
Quote:
Example
File
(dir) WC1_1_40305250
\
--------> (file name) CSD-WC1_1_40305250.tap
(dir) WC1_2_40305124
\
--------> (file name) CSD-WC1_2_40305124.tap
needs to exported to look like

Quote:
<?xml version="1.0"?>
<segd21-tape vsn="A10000">
<line id="WC1_40305250" seq="1">
<segd-image file="WC1_1_40305250/CSD-WC1_1_40305250.tap"/>
</line>
<line id="WC1_40305124" seq="2">
<segd-image file="WC1_2_40305124/CSD-WC1_2_40305124.tap"/>
</line>
</segd21-tape>
There could be as many as 125-200 Files in the XML file.
Thanks,
Guys

Last edited by joel_garrison; Jul 25th, 2007 at 3:05 PM. Reason: mispellings and general non-sense
joel_garrison is offline   Reply With Quote