/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/xml_serializer.py

  • Committer: Robert Collins
  • Date: 2006-08-08 23:19:29 UTC
  • mfrom: (1884 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1912.
  • Revision ID: robertc@robertcollins.net-20060808231929-4e3e298190214b3a
current status

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
try:
28
28
    from cElementTree import (ElementTree, SubElement, Element,
29
29
                              XMLTreeBuilder, fromstring, tostring)
 
30
    import elementtree
30
31
except ImportError:
31
32
    mutter('WARNING: using slower ElementTree; consider installing cElementTree'
32
33
           " and make sure it's on your PYTHONPATH")
33
34
    from util.elementtree.ElementTree import (ElementTree, SubElement,
34
35
                                              Element, XMLTreeBuilder,
35
36
                                              fromstring, tostring)
 
37
    import util.elementtree as elementtree
36
38
 
37
39
from bzrlib.errors import BzrError
38
40
 
73
75
        return ElementTree().parse(f)
74
76
 
75
77
 
76
 
# performance tuning for elementree's serialiser. THis should be
 
78
# performance tuning for elementree's serialiser. This should be
77
79
# sent upstream - RBC 20060523.
78
 
# the functions here are patched into elementree at runtime.
79
 
import elementtree.ElementTree
 
80
# the functions here are patched into elementtree at runtime.
80
81
import re
81
82
escape_re = re.compile("[&'\"<>]")
82
83
escape_map = {