easy dom creation using LibXML?

Richard Jolly Richard.Jolly at bbc.co.uk
Thu Jan 12 15:44:36 GMT 2006


Robin Berjon wrote:
> On Jan 12, 2006, at 15:27, Richard Jolly wrote:

> I thought about creating a module for this quite a few times but I
> find that most of my helpers are generally simple enough and (more
> importantly) do tend to include small variations that aren't easy to
> abstract so I couldn't really find a satisfying way of doing this.
> 
> What sort of construct are you looking for?

I've nothing concrete in mind. Twig has a lot of transformation methods,
including things such as:

  wrap_in (@tag)

  Wrap elements $tag as the successive ancestors of the element, returns
the 
  new element. $elt->wrap_in( 'td', 'tr', 'table') wraps the element as
a 
  single cell in a table for example.

which may be going to far, but can be very nice when you find you need
them.

The advantage about my homegrown methods is they fit the (current) task
well. But I'm not giving them sufficient time or thought to be useful
beyond that.

Richard

http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.



More information about the london.pm mailing list