source: exist/trunk/python/elementtree-1.3a6-20070310-badc/unittests/test_modify.py @ 3578

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/python/elementtree-1.3a6-20070310-badc/unittests/test_modify.py@3578
Revision 3578, 613 bytes checked in by pjkersha, 11 years ago (diff)

Latest releases from Fredrik Lundh. 10 March release has exclusive C14N support with namespace prefixes.

Line 
1# $Id: test_modify.py 3298 2007-09-13 14:38:02Z fredrik $
2
3from support import *
4
5def simpleops():
6    """
7    >>> elem = ET.XML("<body><tag/></body>")
8    >>> serialize(elem)
9    '<body><tag /></body>'
10    >>> e = ET.Element("tag2")
11    >>> elem.append(e)
12    >>> serialize(elem)
13    '<body><tag /><tag2 /></body>'
14    >>> elem.remove(e)
15    >>> serialize(elem)
16    '<body><tag /></body>'
17    >>> elem.insert(0, e)
18    >>> serialize(elem)
19    '<body><tag2 /><tag /></body>'
20    >>> elem.remove(e)
21    >>> elem.extend([e])
22    >>> serialize(elem)
23    '<body><tag /><tag2 /></body>'
24    >>> elem.remove(e)
25    """
Note: See TracBrowser for help on using the repository browser.