Data Studio: How do I Convert a .TXT file from File RTD into an .XML file

Topic

How to Convert a .TXT file from File RTD into an .XML file to use with Data Studio

Environment

  • Product: 
  • Component: Data Studio
  • Control System: Show Control System (SCS), Venus Control Suite (VCS)

Steps

What is XML?
The Extensible Markup Language (XML) is a text-based format for representing structured information. It's one of the most widely used formats, and it is supported by the Data Studio platform.

Elements of XML
XML Prolog:

<?xml version="1.0" encoding="UTF-8"?>
 
XML documents must contain one root element that is the parent of all other elements:
<root>
     <child>
          <subchild>….</subchild>
     </child>
</root>
 
All XML Elements Must Have a Closing Tag:
<name>….</name>
 
XML Example:
<?xml version="1.0" encoding="UTF-8"?>
<content>
     <winners>
          <node>
               <event_id>624</event_id>

               <number>1329116014</number>
               <amount>$7,274.00</amount>
               <claimed>1571933245</claimed>
               <time_picked>2019-09-26 21:38:39</time_picked>
              <eventtitle>Padres vs Dodgers</eventtitle>
              <date>2019-09-26</date>
          </node>

     </winners>
</content> 

Take an Existing .TXT File and Convert it to .XML 
Starting txt file:
NDSU
10
SDSU
17
MSU
35
MDSU
14
 
Turns into:
<?xml version="1.0" encoding="UTF-8"?>
 
<scores>
     <game_1>
          <guest_team>NDSU</guest_team>
          <guest_score>10</guest_score>
          <home_team>SDSU</home_team>
          <home_score>17</home_score>
     
</game_1>
     <game_2>
          <guest_team>MSU</guest_team>
          <guest_score>35</guest_score>
          <home_team>MDSU</home_team>
          <home_score>14</home_score>
     </game_2>
</scores>

 

Additional Resources

There are many resources on the internet regarding XML. W3Schools.com XML Syntax Rules is a good place to start.

KB ID: 000020420


DISCLAIMER: Use of this content may void the equipment warranty, please read the disclaimer prior to performing any service of the equipment.

DAKTRONICS DOES NOT PROMISE THAT THE CONTENT PROVIDED HEREIN IS ERROR-FREE OR THAT ANY DEFECTS WILL BE CORRECTED, OR THAT YOUR USE OF THE CONTENT WILL PROVIDE SPECIFIC RESULTS. THE CONTENT IS DELIVERED ON AN "AS-IS" AND "AS-AVAILABLE" BASIS. ALL INFORMATION PROVIDED IN THIS ARTICLE IS SUBJECT TO CHANGE WITHOUT NOTICE. DAKTRONICS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF ACCURACY, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. DAKTRONICS DISCLAIMS ANY AND ALL LIABILITY FOR THE ACTS, OMISSIONS AND CONDUCT OF YOU OR ANY THIRD PARTIES IN CONNECTION WITH OR RELATED TO YOUR USE OF THE CONTENT. ADJUSTMENT, REPAIR, OR SERVICE OF THE EQUIPMENT BY ANYONE OTHER THAN DAKTRONICS OR ITS AUTHORIZED REPAIR AGENTS MAY VOID THE EQUIPMENT WARRANTY. YOU ASSUME TOTAL RESPONSIBILITY FOR YOUR USE OF THE CONTENT AND ANY LINKED CONTENT. YOUR SOLE REMEDY AGAINST DAKTRONICS FOR DISSATISFACTION WITH THE CONTENT IS TO STOP USING THE CONTENT. THIS LIMITATION OF RELIEF IS A PART OF THE BARGAIN BETWEEN THE PARTIES.

The above disclaimer applies to any property damage, equipment failure, liability, infringement, or personal injury claim arising out of or in any way related to your use or application of the content, whether such claim is for breach of contract, tort, negligence or any other cause of action.