Convert a file with a special format to an XML file

Source: Internet
Author: User
If we now have such a file Food.tab
The contents are as follows:
Room_number Breakfast Lunch Dinner
290 Bagel Pizza Salmon
Chicken Orange Pizza ala King
349 Sweet Roll Salad Tofu and vegetables
Omelet Sausage Veal
702 Eggs Tuna Fish Cheese Sandwich
Each item in the file is split with vbtab
So now we're going to automatically translate it into an XML file like the following
<kitchen xmlns= "The_roach_motel" >
<Room_Service>
<Room_Number>290</Room_Number>
<Breakfast>Bagel</Breakfast>
<Lunch>Pizza</Lunch>
<Dinner>Salmon</Dinner>
</Room_Service>
<Room_Service>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.