]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Demo/xml/roundtrip.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Demo / xml / roundtrip.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/roundtrip.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/roundtrip.py
deleted file mode 100644 (file)
index 921b2b8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""\r
-A simple demo that reads in an XML document and spits out an equivalent,\r
-but not necessarily identical, document.\r
-"""\r
-\r
-import sys\r
-\r
-from xml.sax import saxutils, handler, make_parser\r
-\r
-# --- The ContentHandler\r
-\r
-class ContentGenerator(handler.ContentHandler):\r
-\r
-    def __init__(self, out=sys.stdout):\r
-        handler.ContentHandler.__init__(self)\r
-        self._out = out\r
-\r
-    # ContentHandler methods\r
-\r
-    def startDocument(self):\r
-        self._out.write('<?xml version="1.0" encoding="iso-8859-1"?>\n')\r
-\r
-    def startElement(self, name, attrs):\r
-        self._out.write('<' + name)\r
-        for (name, value) in attrs.items():\r
-            self._out.write(' %s="%s"' % (name, saxutils.escape(value)))\r
-        self._out.write('>')\r
-\r
-    def endElement(self, name):\r
-        self._out.write('</%s>' % name)\r
-\r
-    def characters(self, content):\r
-        self._out.write(saxutils.escape(content))\r
-\r
-    def ignorableWhitespace(self, content):\r
-        self._out.write(content)\r
-\r
-    def processingInstruction(self, target, data):\r
-        self._out.write('<?%s %s?>' % (target, data))\r
-\r
-# --- The main program\r
-\r
-if __name__ == '__main__':\r
-    parser = make_parser()\r
-    parser.setContentHandler(ContentGenerator())\r
-    parser.parse(sys.argv[1])\r