Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Select Node

by poj (Abbot)
on Feb 20, 2016 at 15:43 UTC ( [id://1155712]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Select Node
in thread Select Node

You can build the search path using variables like this

my $x = 2; my $y = $x * 2; my $xpath = "/find/find/work[\@eu='$y']"; print "Searching for $xpath\n"; my $twig = XML::Twig::XPath->new( twig_roots => { $xpath => \&work, }, );

I don't see sub chapter in the XML

poj

Replies are listed 'Best First'.
Re^4: Select Node
by Arenas (Novice) on Feb 20, 2016 at 16:15 UTC
    Hello Sir!

    Many thank for tou quik reply!
    Oh!

    Sorry i forgot to arsk how do to get the output formula(mask format string): # ###.#### (force)
    Is it also possible for Perl?

    # I dont need to convert to int/string for the html output? my forme = # ###.#### $xpath; $forme;
    ??

    Nota bene:
    I see for the chapter. My fault

    Thank
    @r

    ..(\(°°)/)..

      What's in $xpath and what does it look like after formatting ?

      poj

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found