Revision ad82bf43 ncclient/xml_.py
b/ncclient/xml_.py | ||
---|---|---|
1 | 1 |
# Copyright 2009 Shikhar Bhushan |
2 |
# Copyright 2011 Leonidas Poulopoulos |
|
2 | 3 |
# |
3 | 4 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 5 |
# you may not use this file except in compliance with the License. |
... | ... | |
17 | 18 |
from cStringIO import StringIO |
18 | 19 |
from xml.etree import cElementTree as ET |
19 | 20 |
|
20 |
# in case problems occur include the ElementTree file from the parent dir
|
|
21 |
# import ElementTree as ET
|
|
21 |
# In case issues come up with XML generation/parsing
|
|
22 |
# make sure you have the ElementTree v1.2.7+ lib
|
|
22 | 23 |
|
23 | 24 |
from ncclient import NCClientError |
24 | 25 |
|
... | ... | |
103 | 104 |
|
104 | 105 |
new_ele = lambda tag, attrs={}, **extra: ET.Element(qualify(tag), attrs, **extra) |
105 | 106 |
|
106 |
sub_ele = lambda parent, tag, attrs={}, **extra: ET.SubElement(parent, qualify(tag), attrs, **extra) |
|
107 |
sub_ele = lambda parent, tag, attrs={}, **extra: ET.SubElement(parent, qualify(tag), attrs, **extra) |
|
108 |
|
Also available in: Unified diff