小编dus*_*ker的帖子

使用perl - regex解析XML文件

我只是perl中的一个初学者,并且非常迫切需要准备一个小脚本,它从xml文件中获取前三项内容并将它们放入一个新脚本中.这是一个xml文件的示例:

    <article>
  {lot of other stuff here}
</article>
<article>
  {lot of other stuff here}
</article>
<article>
  {lot of other stuff here}
</article>
<article>
  {lot of other stuff here}
</article>
Run Code Online (Sandbox Code Playgroud)

我想做的是获得前3个项目以及其间的所有标签并将其放入另一个文件中.感谢所有的帮助提前问候彼得

regex perl

1
推荐指数
1
解决办法
1505
查看次数

标签 统计

perl ×1

regex ×1