Parsing XML file with perl - regex

Posted by dusker on Stack Overflow See other posts from Stack Overflow or by dusker
Published on 2010-06-03T09:25:44Z Indexed on 2010/06/03 9:34 UTC
Read the original article Hit count: 281

Filed under:
|

Hi Everyone, i'm just a begginer in perl, and very urgently need to prepare a small script that takes top 3 things from an xml file and puts them in a new one. Here's an example of an xml file:

    <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>

What i'd like to do is to get first 3 items along with all the tags in between and put it into another file. Thanks for all the help in advance regards peter

© Stack Overflow or respective owner

Related posts about regex

Related posts about perl