in reply to Replacing things in XML files

XML::Simple

Just for the record, it is simple for simple XML things, however the parameters and options available in this package have complex implications on how the XML information is read in and written out.

Hazah! I'm Employed!

Replies are listed 'Best First'.
Re^2: Replacing things in XML files
by John M. Dlugosz (Monsignor) on Apr 27, 2006 at 18:31 UTC
    It looks like XML::Simple loses the distinction between attributes and child elements, when building the returned data structure. How do you preserve the actual content when writing it back out?

      This is definitely one of the difficulties I've had with XML::Simple. XMLin and XMLout aren't the inverse of each other. In other words, it's difficult write out the same thing that you read in and vice versa.

      I if you need that, you should probably look at XML::Twig.

      Hazah! I'm Employed!