summaryrefslogtreecommitdiff
path: root/python/libxml.py
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-02-11 18:42:20 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-02-11 18:42:20 +0000
commit01a6d4170c87368621db478b4d98530265bb9b1f (patch)
tree6c1dcb51c34fc6b931fc912ad4063c669fd2afca /python/libxml.py
parent397ff11cdd8aeae52b1e5f9f17d03a144c323196 (diff)
downloadlibxml2-01a6d4170c87368621db478b4d98530265bb9b1f.tar.gz
removed tabs and used spaces. Daniel
* python/*.py: removed tabs and used spaces. Daniel
Diffstat (limited to 'python/libxml.py')
-rw-r--r--python/libxml.py168
1 files changed, 84 insertions, 84 deletions
diff --git a/python/libxml.py b/python/libxml.py
index fdec3e61..87139e83 100644
--- a/python/libxml.py
+++ b/python/libxml.py
@@ -9,108 +9,108 @@ import libxml2mod
class xmlCore:
def __init__(self, _obj=None):
if _obj != None:
- self._o = _obj;
- return
- self._o = None
+ self._o = _obj;
+ return
+ self._o = None
def __getattr__(self, attr):
if attr == "parent":
- ret = libxml2mod.parent(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
elif attr == "properties":
- ret = libxml2mod.properties(self._o)
- if ret == None:
- return None
- return xmlAttr(_obj=ret)
- elif attr == "children":
- ret = libxml2mod.children(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
- elif attr == "last":
- ret = libxml2mod.last(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
- elif attr == "next":
- ret = libxml2mod.next(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
- elif attr == "prev":
- ret = libxml2mod.prev(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
- elif attr == "content":
- return libxml2mod.xmlNodeGetContent(self._o)
- elif attr == "name":
- return libxml2mod.name(self._o)
- elif attr == "type":
- return libxml2mod.type(self._o)
- elif attr == "doc":
- ret = libxml2mod.doc(self._o)
- if ret == None:
- return None
- return xmlDoc(_doc=ret)
- raise AttributeError,attr
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ elif attr == "children":
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
+ elif attr == "last":
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
+ elif attr == "next":
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
+ elif attr == "prev":
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
+ elif attr == "content":
+ return libxml2mod.xmlNodeGetContent(self._o)
+ elif attr == "name":
+ return libxml2mod.name(self._o)
+ elif attr == "type":
+ return libxml2mod.type(self._o)
+ elif attr == "doc":
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ return None
+ return xmlDoc(_doc=ret)
+ raise AttributeError,attr
- #
- # Those are common attributes to nearly all type of nodes
- #
+ #
+ # Those are common attributes to nearly all type of nodes
+ #
def get_parent(self):
- ret = libxml2mod.parent(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
def get_children(self):
- ret = libxml2mod.children(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
def get_last(self):
- ret = libxml2mod.last(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
def get_next(self):
- ret = libxml2mod.next(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
def get_properties(self):
- ret = libxml2mod.properties(self._o)
- if ret == None:
- return None
- return xmlAttr(_obj=ret)
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
def get_doc(self):
- ret = libxml2mod.doc(self._o)
- if ret == None:
- return None
- return xmlDoc(_obj=ret)
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ return None
+ return xmlDoc(_obj=ret)
def get_prev(self):
- ret = libxml2mod.prev(self._o)
- if ret == None:
- return None
- return xmlNode(_obj=ret)
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return xmlNode(_obj=ret)
def get_content(self):
- return libxml2mod.xmlNodeGetContent(self._o)
+ return libxml2mod.xmlNodeGetContent(self._o)
def getContent(self):
- return libxml2mod.xmlNodeGetContent(self._o)
+ return libxml2mod.xmlNodeGetContent(self._o)
def get_name(self):
- return libxml2mod.name(self._o)
+ return libxml2mod.name(self._o)
def get_type(self):
- return libxml2mod.type(self._o)
+ return libxml2mod.type(self._o)
def get_doc(self):
- ret = libxml2mod.doc(self._o)
- if ret == None:
- return None
- return xmlDoc(_doc=ret)
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ return None
+ return xmlDoc(_doc=ret)
def free(self):
libxml2mod.freeDoc(self._o)
-
+
#
# converters to present a nicer view of the XPath returns
#
@@ -138,7 +138,7 @@ def nodeWrap(o):
def xpathObjectRet(o):
if type(o) == type([]) or type(o) == type(()):
ret = map(lambda x: nodeWrap(x), o)
- return ret
+ return ret
return o
#