#!/usr/bin/perl use strict; use warnings; use Text::Markdown 'markdown'; use HTML::TreeBuilder; my @a = ; my $html; $html = markdown("@a"); print "=========\n", $html; my $tree = HTML::TreeBuilder->new; $tree->parse($html); my ($b) = $tree->look_down( '_tag', 'body' ); my @body = $b->content_list; # Kindknoten print "=========\n"; print $_->as_XML for @body; $tree->delete; # clear memory! __DATA__ # Test