Normally CDATA sections are just an easy way to input text that might have special characters in it. For an XML processors there is absolutely no difference between a CDATA section and the same data encoded using < and its friends.
At least that's how things should be in a ideal world.
But yes, in this less-than-perfect world, you can use XML::Twig. It will preserve CDATA sections, it can also preserve attribute order (some software is known to care about that. use the keep_atts_order option) and numerical entities (use the keep_encoding option, with caution). It's not quite as simple to use as XML::Simple, but it should be easy enough to learn for the task you describe.
In reply to Re: Preserving CDATA Tags When Saving XML
by mirod
in thread Preserving CDATA Tags When Saving XML
by THuG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |