in reply to Re: How to avoid addition of tags by HTML::TreeBuilder
in thread How to avoid addition of tags by HTML::TreeBuilder

Not Working : Tried by setting options provided by you

Output after setting your options :

<!DOCTYPE html> <html><head></head><body></body> <body> <p>test https://www.google.com</p> </body></html>

Expected output : (Same as input)

<!DOCTYPE html> <body> <p>test https://www.google.com</p> </body>

Replies are listed 'Best First'.
Re^3: How to avoid addition of tags by HTML::TreeBuilder
by Your Mother (Archbishop) on Apr 19, 2019 at 14:33 UTC

    The expected output is illegal HTML; in fact so is the Tree builder version. HTML5 requires the title. Getting tools to produce incorrect output is usually be outside their scope.

    If you always have the same template but differing bodies, you could just use the tree to print the body content into your template. Otherwise there might be a limited number of cases you could convert into a heuristic tree with matching template pieces to get what you want.

      Illegal html? Lol

        Wanting tools to go against specs? LULZ.

        "...LOL"

        It is illegal Dr Wisenheimer: Error: Element head is missing a required instance of child element title. See W3C Markup Validation Service if you believe in standards. LOL, Karl

        «The Crux of the Biscuit is the Apostrophe»

        perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Re^3: How to avoid addition of tags by HTML::TreeBuilder
by Anonymous Monk on Apr 19, 2019 at 07:45 UTC
    That's as good as it gets with Treebuilder