in reply to XML::Twig Mangles XML prolog

I wanted to see whether I can help, so I ran your program, but I got different result. Both prolog and comments are fine.

It is quite reasonable for me to think that this is a version thing. My XML::Twig is 3.14, however the result might also be impacted by things like expat, XML::Parser and Scalar::Util.

<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Applicat +ion 2.3//E N" "http://java.sun.com/dtd/web-app_2_3.dtd"> <!-- This is my comment --> <web-app> </web-app><web-app> <servlet> <servlet-name>Authenticate_en_US</servlet-name> <jsp-file>/vxml/en_US/type_0/entry/Authenticate.jsp</jsp-file> <load-on-startup>2</load-on-startup> </servlet> </web-app>
3.14

Replies are listed 'Best First'.
Re^2: XML::Twig Mangles XML prolog
by gjeffrey (Acolyte) on Jul 27, 2004 at 16:42 UTC
    Thanks for your response. I am not in a position to update the Twig installation. The code work "kind-of-ok" when I remove "TwigPrintOutsideRoots => 1". The program still changes PUBLIC to SYSTEM in doctype, and adds standalone="no" to the xml declaration. However I think I can work around these by acessing and modifying these in the object tree. Thanks again.