in reply to Re: Select Node
in thread Select Node

Hello Sir

Many thank for you help!
Great!
Just one gestion: How do add mathe formula?

Your scripte:

twig_roots => { '/find/find/work[@eu]' Get the new value (exemple?): Selectet node : ??? [@eu] = a * 2 ???
Is it possible to do also with the other items?

I need sub chapter?
Thanks!
@r

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

Replies are listed 'Best First'.
Re^3: Select Node
by poj (Abbot) on Feb 20, 2016 at 15:43 UTC

    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
      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