Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
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
Old Jul 25th, 2007, 2:58 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Your question isn't very clear. Is your problem devising related filenames, or in generating XML (a constrained, textual format)? One can transmogrify filenames with but a mere expenditure of energy.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 25th, 2007, 3:02 PM   #3
joel_garrison
Newbie
 
Join Date: Jul 2007
Posts: 2
Rep Power: 0 joel_garrison is on a distinguished road
Quote:
Originally Posted by DaWei View Post
Your question isn't very clear. Is your problem devising related filenames, or in generating XML (a constrained, textual format)? One can transmogrify filenames with but a mere expenditure of energy.
the issue is in createing the XML file

Forget the photo that I added, it's out of date a wrong. but I need to take the file names and xport them into a xml document. i can create the XML document by hand but that takes ages and was wondering if someone could create a program ( perl/python) that would automate the task for me.

hopefully this clears things up... probley not it doesn't make much since to me either
joel_garrison is offline   Reply With Quote
Old Jul 25th, 2007, 4:08 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
was wondering if someone could create a program ( perl/python) that would automate the task for me.
You might want to consider the Jobs Forum. You don't have to actually offer money there. You will most likely get what you paid for.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Special browser in Java (Project) stalefish Java 3 Feb 9th, 2008 4:22 PM
Language display in program Prm753 C++ 3 May 30th, 2006 5:45 PM
Creating a program to test a program sixstringartist C 8 Jan 21st, 2006 1:15 PM
program to create tables and queries re10 C# 5 Sep 6th, 2005 8:47 AM
How to create program c++? Alice_T C++ 12 Jan 21st, 2005 12:08 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC