get value of attribute in html tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • techtween
    New Member
    • May 2011
    • 7

    get value of attribute in html tag

    for example,

    if this is the tag,

    <httpSample t="527" lt="527" ts="13061464119 99" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="411" />


    i need the value of lt alone to be displayed. i couldnt get it right through regular expression. Hope you can provide me the code. Also, if possible, could you please tell the logic of how to find the maximum and minimum of the lt value if some five or six tags are provided..

    Thanks in advance.
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    If this is actually XML, then I suggest you use cpan XML::Twig.

    If this is html (httpSample is not a valid tag), then use cpan HTML::TreeBuild er::LibXML.

    - Miller

    Comment

    Working...