码迷,mamicode.com
首页 > 其他好文 > 详细

Spark实战练习01--XML数据处理

时间:2018-03-07 15:14:38      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:格式   account   post   type   color   mod   数据格式   数据   number   

一、要求

将XML中的数据提取出来,并以account_number:model格式存储

1、XML文件数据格式

<activations>
  <activation timestamp="1225499258" type="phone">
  <account-number>316</account-number>
  <device-id>
    d61b6971-33e1-42f0-bb15-aa2ae3cd8680
  </device-id>
  <phone-number>5108307062</phone-number>
  <model>iFruit 1</model>
  </activation>

</activations>
2、存储格式:

1234:iFruit 1
987:Sorrento F00L
4566:iFruit 1

Spark实战练习01--XML数据处理

标签:格式   account   post   type   color   mod   数据格式   数据   number   

原文地址:https://www.cnblogs.com/damonzjw/p/8521757.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!