[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

09/10/2009 at 05:55PM PDT, ID: 24723352
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Merge Multiple XML Files using a batch file

Asked by vegasIT in MS DOS, Windows Batch Scripting

Tags: dos, batch, xml, vb, vbscript

I need to merge multiple (100's) of XML files into one file that I can import into a MySQL database.

There are two parts to this:

1) I need to add a tag for the file name
2) I need the output file to contain all the data plus the new tag for each file that is merged


So for example I have a directory that contains:
2009-09-08-09-21-29_115_112.xml
2009-09-08-09-21-29_115_112.wav
2009-09-08-09-21-03_7028691049_115.xml
2009-09-08-09-21-03_7028691049_115.wav
2009-09-08-09-18-03_100_112.xml
2009-09-08-09-18-03_100_112.wav

etc... I need the xml files combined and then a new tag called <file_name> created for each

So for the 3 xml files above the output would be:

  <recording_info>
  <recording_tag>All Record</recording_tag>
  <recorded_call_id>36329</recorded_call_id>
  <recorder_cid />
  <recorded_cid>Distribution <112></recorded_cid>
  <recorder_account_id />
  <recorded_account_id>1111</recorded_account_id>
  <from_account_id>1113</from_account_id>
  <from_caller_id>John Segrest <115></from_caller_id>
  <to_account_id>1111</to_account_id>
  <to_caller_id>Distribution <112></to_caller_id>
  <duration>99</duration>
  <date_created_ts>2009-09-08 09:21:29.617108</date_created_ts>
  <date_created_secs>1252426890</date_created_secs>
  <file_name>2009-09-08-09-21-29_115_112.wav</file_name>
  </recording_info>
  <recording_info>
  <recording_tag>All Record</recording_tag>
  <recorded_call_id>36328</recorded_call_id>
  <recorder_cid />
  <recorded_cid>John Segrest <115></recorded_cid>
  <recorder_account_id />
  <recorded_account_id>1113</recorded_account_id>
  <from_account_id>0</from_account_id>
  <from_caller_id>GAGE AND GAGE L <7028691049></from_caller_id>
  <to_account_id>1113</to_account_id>
  <to_caller_id>John Segrest <115></to_caller_id>
  <duration>36</duration>
  <date_created_ts>2009-09-08 09:21:03.232146</date_created_ts>
  <date_created_secs>1252426863</date_created_secs>
  <file_name>2009-09-08-09-21-03_7028691049_115.wav</file_name>
  </recording_info>
  <recording_info>
  <recording_tag>All Record</recording_tag>
  <recorded_call_id>36327</recorded_call_id>
  <recorder_cid />
  <recorded_cid>Kimberly Miles <109></recorded_cid>
  <recorder_account_id />
  <recorded_account_id>1107</recorded_account_id>
  <from_account_id>1107</from_account_id>
  <from_caller_id>Kimberly Miles <109></from_caller_id>
  <to_account_id>-1</to_account_id>
  <to_caller_id>95475425</to_caller_id>
  <duration>160</duration>
  <date_created_ts>2009-09-08 09:18:34.037292</date_created_ts>
  <date_created_secs>1252426714</date_created_secs>
  <file_name>2009-09-08-09-18-34_109_95475425.wav</file_name>
  </recording_info>


The original XML file contains everything EXCEPT the <file_name> line. The file name is always the same as the XML file name except that the extension is wav (always)

Then i need the original xml files either deleted or move to a different location like a bak folder or something. All the files are in the same directory and will remain in the same directory.
[+][-]09/10/09 06:17 PM, ID: 25306018

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/10/09 06:21 PM, ID: 25306030

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/09 07:12 PM, ID: 25306218

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09/10/09 08:46 PM, ID: 25306575

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/09 09:27 PM, ID: 25306695

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/11/09 04:42 AM, ID: 25308363

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS DOS, Windows Batch Scripting
Tags: dos, batch, xml, vb, vbscript
Sign Up Now!
Solution Provided By: Qlemo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09/11/09 04:56 AM, ID: 25308473

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/09 11:12 AM, ID: 25312038

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/11/09 11:18 AM, ID: 25312082

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/09 11:30 AM, ID: 25312189

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/11/09 11:32 AM, ID: 25312209

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625