OXIESEC PANEL
- Current Dir:
/
/
lib64
/
python2.7
/
xml
/
dom
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/16/2024 08:50:43 PM
rwxr-xr-x
📄
NodeFilter.py
937 bytes
11/15/2023 03:01:12 PM
rw-r--r--
📄
NodeFilter.pyc
1.1 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
NodeFilter.pyo
1.1 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
__init__.py
3.9 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
__init__.pyc
6.33 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
__init__.pyo
6.33 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
domreg.py
3.44 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
domreg.pyc
3.3 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
domreg.pyo
3.3 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
expatbuilder.py
35.53 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
expatbuilder.pyc
32.22 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
expatbuilder.pyo
31.61 KB
11/15/2023 03:01:21 PM
rw-r--r--
📄
minicompat.py
3.28 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
minicompat.pyc
3.35 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
minicompat.pyo
3.24 KB
11/15/2023 03:01:21 PM
rw-r--r--
📄
minidom.py
64.72 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
minidom.pyc
64.07 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
minidom.pyo
63.94 KB
11/15/2023 03:01:21 PM
rw-r--r--
📄
pulldom.py
11.69 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
pulldom.pyc
12.77 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
pulldom.pyo
12.77 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
xmlbuilder.py
12.05 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
xmlbuilder.pyc
14.98 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
xmlbuilder.pyo
14.94 KB
11/15/2023 03:01:21 PM
rw-r--r--
Editing: minicompat.py
Close
"""Python version compatibility support for minidom.""" # This module should only be imported using "import *". # # The following names are defined: # # NodeList -- lightest possible NodeList implementation # # EmptyNodeList -- lightest possible NodeList that is guaranteed to # remain empty (immutable) # # StringTypes -- tuple of defined string types # # defproperty -- function used in conjunction with GetattrMagic; # using these together is needed to make them work # as efficiently as possible in both Python 2.2+ # and older versions. For example: # # class MyClass(GetattrMagic): # def _get_myattr(self): # return something # # defproperty(MyClass, "myattr", # "return some value") # # For Python 2.2 and newer, this will construct a # property object on the class, which avoids # needing to override __getattr__(). It will only # work for read-only attributes. # # For older versions of Python, inheriting from # GetattrMagic will use the traditional # __getattr__() hackery to achieve the same effect, # but less efficiently. # # defproperty() should be used for each version of # the relevant _get_<property>() function. __all__ = ["NodeList", "EmptyNodeList", "StringTypes", "defproperty"] import xml.dom try: unicode except NameError: StringTypes = type(''), else: StringTypes = type(''), type(unicode('')) class NodeList(list): __slots__ = () def item(self, index): if 0 <= index < len(self): return self[index] def _get_length(self): return len(self) def _set_length(self, value): raise xml.dom.NoModificationAllowedErr( "attempt to modify read-only attribute 'length'") length = property(_get_length, _set_length, doc="The number of nodes in the NodeList.") # For backward compatibility def __setstate__(self, state): if state is None: state = [] self[:] = state class EmptyNodeList(tuple): __slots__ = () def __add__(self, other): NL = NodeList() NL.extend(other) return NL def __radd__(self, other): NL = NodeList() NL.extend(other) return NL def item(self, index): return None def _get_length(self): return 0 def _set_length(self, value): raise xml.dom.NoModificationAllowedErr( "attempt to modify read-only attribute 'length'") length = property(_get_length, _set_length, doc="The number of nodes in the NodeList.") def defproperty(klass, name, doc): get = getattr(klass, ("_get_" + name)).im_func def set(self, value, name=name): raise xml.dom.NoModificationAllowedErr( "attempt to modify read-only attribute " + repr(name)) assert not hasattr(klass, "_set_" + name), \ "expected not to find _set_" + name prop = property(get, set, doc=doc) setattr(klass, name, prop)