xmlstarlet fo
जो मैं सुंदर मुद्रण के लिए उपयोग करता हूं।
$ xmlstarlet fo --help
XMLStarlet Toolkit: Format XML document
Usage: xml fo [<options>] <xml-file>
where <options> are
-n or --noindent - do not indent
-t or --indent-tab - indent output with tabulation
-s or --indent-spaces <num> - indent output with <num> spaces
-o or --omit-decl - omit xml declaration <?xml version="1.0"?>
-R or --recover - try to recover what is parsable
-D or --dropdtd - remove the DOCTYPE of the input docs
-C or --nocdata - replace cdata section with text nodes
-N or --nsclean - remove redundant namespace declarations
-e or --encode <encoding> - output in the given encoding (utf-8, unicode...)
-H or --html - input is HTML
एक अच्छा एक्सएमएल इंजीनियर xmlstarlet फिराना करने के लिए सक्षम होना चाहिए: Xmlstarlet विकल्प की एक संख्या है।
टैग libxml2.XML_SAVE_NO_EMPTY साथ किया जाता है " बिल्ली config.xml | xmllint --format - "सुंदर काम करता है। –
तारों के लिए भी बहुत अच्छा काम करता है: 'echo "" | xmllint --format -' –
Matt