diff orpg/orpg_xml.py @ 72:8bc955faf819 ornery-dev

Fixing a few mistakes from the last update. When Controls is finished I will be happy because users won't miss an file change due to these small updates.
author sirebral
date Thu, 20 Aug 2009 03:45:45 -0500
parents c54768cffbd4
children 217fb049bd00 dcf4fbe09b70
line wrap: on
line diff
--- a/orpg/orpg_xml.py	Thu Aug 20 03:00:39 2009 -0500
+++ b/orpg/orpg_xml.py	Thu Aug 20 03:45:45 2009 -0500
@@ -29,13 +29,19 @@
 from orpg import minidom
 import string
 
-class xml:
+from orpg.tools.orpg_log import logger
+from orpg.tools.decorators import debugging
+
+class xml:
+    @debugging
     def __init__(self):
         pass
-
+
+    @debugging
     def toxml(self, root, pretty=0):
         return root.toxml(pretty)
-
+
+    @debugging
     def parseXml(self, s):
         "parse and return doc"
         try:
@@ -45,7 +51,8 @@
         except Exception, e:
             print e
             return None
-
+
+    @debugging
     def safe_get_text_node(self, xml_dom):
         """ returns the child text node or creates one if doesnt exist """
         t_node = xml_dom._get_firstChild()
@@ -53,14 +60,16 @@
             t_node = minidom.Text("")
             t_node = xml_dom.appendChild(t_node)
         return t_node
-
+
+    @debugging
     def strip_unicode(self, txt):
         for i in xrange(len(txt)):
             if txt[i] not in string.printable:
                 try: txt = txt.replace(txt[i], '&#' + str(ord(txt[i])) + ';')
                 except: txt = txt.replace(txt[i], '{?}')
         return txt
-
+
+    @debugging
     def strip_text(self, txt):
         #  The following block strips out 8-bit characters
         u_txt = ""