我只是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个项目以及其间的所有标签并将其放入另一个文件中.感谢所有的帮助提前问候彼得