Click here to get back home

Pattern matching

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Pattern matching Deepan Perl XML Parser 03-25-2008
Posted by Deepan Perl XML Parser on March 25, 2008, 12:50 am
Please log in for more thread options
Hi all,
I am having a file like below:

<?xml version="1.0" encoding="UTF-8"?>
<log xmlns="http://www.httpwatch.com/xml/log/5.1">
<entry method="GET" URL="http://www.google.com/sa/frame_main.cgi">
.
.
.
.
-------some text-------------
.
.
.
</entry>
<entry method="GET" URL="http://www.toogle.com/framer/main.cgi">
.
.
.
.
-------some text-------------
.
.
.
</entry>
<entry method="GET" URL="http://www.google.com/sa/frame_main.html">
.
.
.
.
-------some text-------------
.
.
.
</entry>
<page id="page_0" title="Sustaining Portal" dynamic="true"
unknown="false">
        <started>00:00:00.000</started>
        <startedDateTime>2008-03-25T09:52:12.791</startedDateTime>
</page>
<page id="page_1" title="Sustaining Portal" dynamic="true"
unknown="false">
        <started>00:00:08.455</started>
        <startedDateTime>2008-03-25T09:52:21.246</startedDateTime>
</page>
<page id="page_2" title="Sustaining Portal" dynamic="true"
unknown="false">
        <started>00:00:20.296</started>
        <startedDateTime>2008-03-25T09:52:33.087</startedDateTime>
</page>
<page id="page_3" title="Sustaining Portal" dynamic="true"
unknown="false">
        <started>00:00:29.848</started>
        <startedDateTime>2008-03-25T09:52:42.639</startedDateTime>
</page>
</log>

----------------------------------------------------------------------------------

Now how to get all those <entry ....> tags into an array? I mean
getting

<entry method="GET" URL="http://www.google.com/sa/
frame_main.cgi">
<entry method="GET" URL="http://www.toogle.com/framer/
main.cgi">
<entry method="GET" URL="http://www.google.com/sa/
frame_main.html">

into some array.

Thanks,
Deepan

Similar ThreadsPosted
Help with Pattern matching. Matching multiple lines from while reading from a file. May 2, 2007, 11:37 pm
Pattern Matching December 15, 2004, 10:51 am
[PATTERN MATCHING] December 17, 2004, 12:14 pm
[PATTERN MATCHING] December 20, 2004, 8:32 am
pattern matching January 26, 2005, 8:10 am
Pattern Matching March 17, 2005, 1:09 pm
pattern matching.... June 27, 2005, 12:00 pm
Help With Pattern Matching July 4, 2005, 4:27 pm
pattern matching April 20, 2006, 7:15 am
pattern matching May 23, 2006, 11:23 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap