mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Rework XML helpers functions
- Merge make_tag, tag_from_clark and tag_from_human into make_clark and make_human - Don't use RegEx for parsing
This commit is contained in:
parent
262d76cc87
commit
d3776e55fb
10 changed files with 200 additions and 198 deletions
|
@ -31,15 +31,15 @@ def xml_delete(base_prefix, path, collection, href=None):
|
|||
"""
|
||||
collection.delete(href)
|
||||
|
||||
multistatus = ET.Element(xmlutils.make_tag("D", "multistatus"))
|
||||
response = ET.Element(xmlutils.make_tag("D", "response"))
|
||||
multistatus = ET.Element(xmlutils.make_clark("D:multistatus"))
|
||||
response = ET.Element(xmlutils.make_clark("D:response"))
|
||||
multistatus.append(response)
|
||||
|
||||
href = ET.Element(xmlutils.make_tag("D", "href"))
|
||||
href = ET.Element(xmlutils.make_clark("D:href"))
|
||||
href.text = xmlutils.make_href(base_prefix, path)
|
||||
response.append(href)
|
||||
|
||||
status = ET.Element(xmlutils.make_tag("D", "status"))
|
||||
status = ET.Element(xmlutils.make_clark("D:status"))
|
||||
status.text = xmlutils.make_response(200)
|
||||
response.append(status)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue