这是
How to pretty print XML from the command line?的后续问题.
libxml2中是否有任何工具可以让我对齐每个节点的属性?我有一个大的XML文档,其逻辑结构我无法改变,但我想转向
<a attr="one" bttr="two" tttr="three" fttr="four"/>
成
<a attr = "one" bttr = "two" tttr = "three" fttr = "four" longer = "attribute" />