Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by tangent (Parson)
on Aug 06, 2019 at 14:57 UTC ( [id://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 (Friar) 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?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-18 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found