3030# functions
3131# ===========================================================================
3232
33- def oxml_fromstring (text ):
33+ def parse_xml (text ):
3434 """
3535 ``etree.fromstring()`` replacement that uses oxml parser
3636 """
@@ -112,7 +112,7 @@ def new(ext, content_type):
112112 values.
113113 """
114114 xml = '<Default xmlns="%s"/>' % nsmap ['ct' ]
115- default = oxml_fromstring (xml )
115+ default = parse_xml (xml )
116116 default .set ('Extension' , ext )
117117 default .set ('ContentType' , content_type )
118118 return default
@@ -138,7 +138,7 @@ def new(partname, content_type):
138138 values.
139139 """
140140 xml = '<Override xmlns="%s"/>' % nsmap ['ct' ]
141- override = oxml_fromstring (xml )
141+ override = parse_xml (xml )
142142 override .set ('PartName' , partname )
143143 override .set ('ContentType' , content_type )
144144 return override
@@ -163,7 +163,7 @@ def new(rId, reltype, target, target_mode=RTM.INTERNAL):
163163 Return a new ``<Relationship>`` element.
164164 """
165165 xml = '<Relationship xmlns="%s"/>' % nsmap ['pr' ]
166- relationship = oxml_fromstring (xml )
166+ relationship = parse_xml (xml )
167167 relationship .set ('Id' , rId )
168168 relationship .set ('Type' , reltype )
169169 relationship .set ('Target' , target )
@@ -224,7 +224,7 @@ def new():
224224 Return a new ``<Relationships>`` element.
225225 """
226226 xml = '<Relationships xmlns="%s"/>' % nsmap ['pr' ]
227- relationships = oxml_fromstring (xml )
227+ relationships = parse_xml (xml )
228228 return relationships
229229
230230 @property
@@ -274,7 +274,7 @@ def new():
274274 Return a new ``<Types>`` element.
275275 """
276276 xml = '<Types xmlns="%s"/>' % nsmap ['ct' ]
277- types = oxml_fromstring (xml )
277+ types = parse_xml (xml )
278278 return types
279279
280280 @property
0 commit comments