Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: getting ancestors of element

by mertserger (Curate)
on Aug 31, 2012 at 09:12 UTC ( #990957=note: print w/replies, xml ) Need Help??


in reply to getting ancestors of element

I would recommend mirod's site http://xmltwig.org/xmltwig/ as he is the author of XML::Twig. I find this section http://xmltwig.org/xmltwig/twig_stable.html particularly useful.

I think your code my @names = $twig->ancestors('values'); has two problems. Firstly it is actually looking for ancestors of the string itself (and there are none). You need to find every tag within the string and find theirancestors. Secondly you have an optional condition on the ancestors: the ('values') bit. This means you would only get ancestors called 'values'. If you want every ancestor, no condition is needed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://990957]
help
Chatterbox?
[Perl300]: I found from Super Search
[Perl300]: I found from Super Search, Net::SMTPS or Net::SMTP, MIME::Lite, Email as options
[1nickt]: Perl300 Try Email::Stuffer
[1nickt]: Or for a little more control, Email::Sender:: Simple
[Perl300]: any suggestion on which one might be secure and simplest. I am not doing anything complex, just check some conditions from DB tables and send email to myself (same domain) if conditions are met
[1nickt]: read the doc of the suggestions I just gave
[1nickt]: A lot depends on whether you are sending mail from your local box or using a remote server
[hippo]: Secure in what sense?
[Perl300]: I am sending from remote server
[1nickt]: Then see Email::Sender:: Transport::SMTP

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2017-10-17 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (233 votes). Check out past polls.

    Notices?