A Python UPnP Media Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
424 B

  1. #!/usr/bin/python
  2. # Copyright 2005, Tim Potter <tpot@samba.org>
  3. # Licensed under the MIT license
  4. # http://opensource.org/licenses/mit-license.php
  5. """Take XML on stdin and produce pretty-printed XML on stdout."""
  6. import sys
  7. from xml.dom import minidom
  8. str = ""
  9. for s in sys.stdin.readlines():
  10. str = str + s[:-1] # Eat trailing \n
  11. doc = minidom.parseString(str)
  12. print doc.toprettyxml(indent = " ")