Hello,
would you be able to tell me how to code this, still not able to use XML::XPath much:
I need to search the XML file in concern for all the DailyWeatherRecords for a particular month.
Say for the month of January, I need to search for those DailyWeatherRecords which have a "1" in the middle of the
date attribute value, for example "1-1-2004" and "2-1-2004".I'm not sure how to look in the middle of the date value.
The input to the sub that does this is the month i.e January
or "1". For all the DailyWeatherRecords for the month of
January, I need to extract the value of maxdrybulb if it is greater than 30.0, and the date. The sub should
return as an array the list of dates and maxdrybulb values (only if it is greater than 30.0)
For example the array might look like:
1-1-2004
33.95
2-1-2004
30.95
Thanks in advance.
perl_seeker
:)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.