Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Formatting in XML::Twig->print()

by rg0now (Chaplain)
on Feb 12, 2005 at 14:12 UTC ( [id://430404]=note: print w/replies, xml ) Need Help??


in reply to Formatting in XML::Twig->print()

Why not prettifying in a post-processing step?

I mean, if you happen to have libxml2 installed, then you have the unbeatible xmllint utility at your disposal:

rg@something:/tmp$ echo '<PrimaryServers><Server Name="New_2"/><Server + Name="New_1"/></PrimaryServers>' | xmllint --format -
This results in a beautiful XML layout:
<?xml version="1.0"?> <PrimaryServers> <Server Name="New_2"/> <Server Name="New_1"/> </PrimaryServers>

rg0now

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-03-28 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found