in reply to How i can extract the part of server report log based on Ipaddress

I don't see why you're using xml to begin with, but why aren't you using an xml parser? XML::Twig or XML::LibXML, or even XML::Simple (i'd probably use XML::Simple to dump the reports into a sqlite database ...)
  • Comment on Re: How i can extract the part of server report log based on Ipaddress

Replies are listed 'Best First'.
Re^2: How i can extract the part of server report log based on Ipaddress
by choroba (Cardinal) on Aug 17, 2010 at 13:44 UTC
    To be able to use an XML parser, the OP would have to make the logfile a valid XML (i.e. remove repeated <?xml... lines and add a root element). Then, the desired request could be found by this simple XPath:
    /root/request[ipAddress="10.146.163.43"]