【发布时间】:2010-06-03 09:25:44
【问题描述】:
我只是 perl 的初学者,非常迫切需要准备一个小脚本,从 xml 文件中获取前 3 项内容并将它们放入一个新文件中。 下面是一个 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>
我想做的是获取前 3 个项目以及它们之间的所有标签并将其放入另一个文件中。 感谢您提前提供的所有帮助 问候 彼得
【问题讨论】:
-
@SMark:即使。 -- Perl6 正则表达式仍然是错误的工具。 ;-)