hardened the addChild function added accessors needed for xmlNode, a bit

* tree.c: hardened the addChild function
* python/generator.py python/libxml.c python/libxml2-python-api.xml
  python/libxml2class.txt python/libxml_wrap.h python/TODO:
  added accessors needed for xmlNode, a bit more testing and
  extension of interfaces
* python/tests/Makefile.am python/tests/build.py: added a test
  build from scratch/save/load/check
Daniel
diff --git a/python/libxml2-python-api.xml b/python/libxml2-python-api.xml
index a830c75..94d8f84 100644
--- a/python/libxml2-python-api.xml
+++ b/python/libxml2-python-api.xml
@@ -90,5 +90,15 @@
       <info>dump the memory allocated in the file .memdump</info>
       <return type='void'/>
     </function>
+    <function name='xmlNodeGetNs' file='python_accessor'>
+      <info>Get the namespace of a node</info>
+      <return type='xmlNsPtr' info="The namespace or None"/>
+      <arg name='node' type='xmlNodePtr' info='the node'/>
+    </function>
+    <function name='xmlNodeGetNsDefs' file='python_accessor'>
+      <info>Get the namespace of a node</info>
+      <return type='xmlNsPtr' info="The namespace or None"/>
+      <arg name='node' type='xmlNodePtr' info='the node'/>
+    </function>
   </symbols>
 </api>