Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I find the text-tag without any Problems. But when I try to catch the metadata to get the attributes of it, then I get Troubles. Here my code:<text> <metadata attribute1= ".." Attribute2=".."></metadata> </text> <text> <metadata attribute1= ".." Attribute2=".."></metadata> </text>
This is all I have, because I don't know how to go further. (get always the error message: Can_t locate object or reference "getAttribute" via package XML::LibXML::Nodelist) Hope someone could help me with this beginner-mistake Regards, Sandoradoif($data->nodeName eq 'text'){ if ($data->hasChildNodes()) { my $ch = $data->getChildnodes; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Child contains attribute
by hippo (Archbishop) on Aug 26, 2014 at 12:51 UTC | |
by Anonymous Monk on Aug 26, 2014 at 12:56 UTC | |
by Anonymous Monk on Aug 26, 2014 at 13:14 UTC | |
|
Re: Child contains attribute
by AppleFritter (Vicar) on Aug 26, 2014 at 15:32 UTC | |
by Anonymous Monk on Aug 27, 2014 at 13:45 UTC | |
by Anonymous Monk on Aug 27, 2014 at 14:35 UTC | |
|
Re: Child contains attribute
by Anonymous Monk on Aug 26, 2014 at 13:23 UTC | |
|
Re: Child contains attribute
by Anonymous Monk on Aug 26, 2014 at 15:08 UTC |