in reply to processing text nodes using HTML::Element

In both of your problems, the situation is most likely that the method you are using to pull the text out of the nodes (or put text into a node) doesn't do the escaping/unescaping/ignoring of entities that you are expecting, possibly because you aren't specifing the options that you want (probably because you don't kow about those options).

HTML::TreeBuilder is a subclass of HTML::Element ... take a look at the "as_HTML" method in HTML::Element, and the optional "$entities" parameter to see how to control what it escapes.

I'll leave it a an excercise for the reader(s) to find the corrisponding way of controlling how text you add to nodes gets escaped.

  • Comment on Re: processing text nodes using HTML::Element

Replies are listed 'Best First'.
Re: Re: processing text nodes using HTML::Element
by Anonymous Monk on Mar 08, 2003 at 04:00 UTC

    Hmmm. That's not exactly what I expected for an answer but I will be civil and thank you.

    Let's say I'd done my homework studying the documentation and experimenting before I posted my question. Let's say I've done more reading and experimenting after my post.

    I'm not consistently getting output to my liking.

    Now, if you think you know the right way, would you be less facetious and more specific ?

    Mucho gracias

      I'm not consistently getting output to my liking.

      Well, since you haven't posted any code, or even mentioned which methods you are currently using, there's not a lot many people here can do to offer you advice -- other then suggest the methods/options we think you might want to use, and provide links to their documentation. Which I did