Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Indent XML data

by LexPl (Beadle)
on Jan 23, 2025 at 13:50 UTC ( [id://11163831]=note: print w/replies, xml ) Need Help??


in reply to Re: Indent XML data
in thread Indent XML data

First of all, thanks to all colleagues for your helpful feedback!

XML::Twig does work, but it doesn't preserve the order of attributes.

I'm well aware that the order of attributes is typically not significant, as the content doesn't change. In my case, this is an issue because indentation is a preparatory step before diffing so that there would be a large number of false diffs caused by a changed order of attributes. What could I do?

Besides that XML entities in attribute values are simply deleted (and I could not use UTF-8 in my environment).

Replies are listed 'Best First'.
Re^3: Indent XML data
by Corion (Patriarch) on Jan 23, 2025 at 13:53 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11163831]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2025-11-19 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.