I have XML structure in like this:
<A>
<B>One</B>
<C>Two</C>
<D>
<E>Three</E>
<F>Four</F>
...
</D>
...
</A>
Structure is big, complex and I know only begining, i.e: '/A'
and code in perl like this:
use XML::LibXML;
my $parser = XML::LibXML->new();
my $xml = $parser->parse_file($file);
print $xml->find('/A')->to_literal;
gives me result:
OneTwoThreeFour
If I use code like:
print join (" ", map { $_->to_literal } $xml->findnodes('/A/descendant::*'));
I get:
One Two ThreeFour Three Four
I need unique and sparate with withespaces values, i.e.:
One Two Three Four
How to do this?