in reply to Re^4: XML::LibXML - WHAR HASH TREES WHAR?!
in thread XML::LibXML - WHAR HASH TREES WHAR?!
Okay, what if it's a node and not an attribute?
$sb->append(new_data_ele(SourceDBType => 'XML')) if !$sb->findnodes('XML')->size;
Sorry, my bad; it should be hash:
Ok, will strike my comment.
sub child_nodes { my %c = $_[0]('%'); return map { ( my $t = $_ ) =~ s{/CONTENT\K}{}; [ $t => $c{$_} ] } grep $_ ne 'CONTENT', keys %c; }
It still can't differentiate between elements and attributes, though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: XML::LibXML - WHAR HASH TREES WHAR?!
by SineSwiper (Beadle) on Jul 15, 2011 at 22:23 UTC | |
by ikegami (Patriarch) on Jul 18, 2011 at 19:50 UTC |