Marty Pauley wrote:
On Thu Oct 24 15:13:09 2002, Kris Boulez wrote:

What is peoples preferred module for writing XML (files) from within
Perl ? The data is read by a perl script from different (heterogeneous) sources and stored internally in a tree of objects.

I use XML::DOM for that sort of thing.  I haven't tried anything else
since XML::DOM has worked well.  As I walk the tree each node calls
createElement for itself then appendChild for any branches.
XML::LibXML (as mentioned in another post) is likely to be a lot quicker, as it's based on a C library.

Personally, I use either XML::Twig, or XML::SAX::Writer, as appropriate.

The important point is to not use print statements, because you'll get it wrong. :-)

-Dom

--
| Semantico: creators of major online resources |
| URL: http://www.semantico.com/ |
| Tel: +44 (1273) 722222 |
| Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |

Reply via email to