Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: HTML::TreeBuilder::XPath finding attribute values

by tangent (Vicar)
on Aug 06, 2019 at 14:57 UTC ( #11104044=note: print w/replies, xml ) Need Help??


in reply to HTML::TreeBuilder::XPath finding attribute values

As Corion points out your query is returning an Attribute node so you need to replace as_text with string_value. You can also test the node like this:
if ( $d->isAttributeNode ) { print qq(D=\n); print $d->string_value; }

Replies are listed 'Best First'.
Re^2: HTML::TreeBuilder::XPath finding attribute values
by mldvx4 (Monk) on Aug 11, 2019 at 12:32 UTC

    Thanks. That 'isAttributeNode' was very useful to learn about.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11104044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2022-01-25 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (66 votes). Check out past polls.

    Notices?