Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: HTML::Treebuilder - DOCTYPE

by gellyfish (Monsignor)
on Jul 11, 2005 at 12:33 UTC ( #473911=note: print w/replies, xml ) Need Help??


in reply to HTML::Treebuilder - DOCTYPE

See the description of the store_declarations method in the HTML::TreeBuilder documentation.

/J\

Replies are listed 'Best First'.
Re^2: HTML::Treebuilder - DOCTYPE
by smaida (Initiate) on Jul 11, 2005 at 21:17 UTC

    Thanks for the quick reply gellyfish.

    Unfortunately, it's that very method that causes the problem.

    The default option in Treebuilder $tree->store_declarations(0); is to not store the declerations. When I run the program this way, the decleration is dropped altogether. When I use $tree->store_declarations(1); the doctype is inserted after the closing body tag.

    Do you have any other suggestions?

    -Shawn

      Yes, my point was that the documentation indicates that what you are seeing is a bug and invites patches. To be honest you are probably best doing something like stripping the declaration off the returned HTML and sticking it back on the front yourself.

      /J\

        Thanks...
        I just wanted to ask around before I took that approach. I appreciate the input.
        -Shawn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://473911]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2020-05-30 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?