in reply to Comments in XML::Twig

I remember correctly, XML::Twig has options that control the processing of comments. 'keep' writes them in the output, and 'process' adds them to the tree as special elements.
XML::Twig->new(comments => 'process');

Replies are listed 'Best First'.
Re^2: Comments in XML::Twig
by gjeffrey (Acolyte) on Jul 26, 2004 at 21:09 UTC
    Thanks. This works well.

    Any ideas on why it is reformatting the prolog: it added standalone="no" to the xml declaration, and in the DOCTYPE changes PUBLIC to SYSTEM even if I disable DTD loading with

    LoadDTD => 0