|
| 1 | +"""Module for supporting the lxml.etree library. The idea here is to use as much |
| 2 | +of the native library as possible, without using fragile hacks like custom element |
| 3 | +names that break between releases. The downside of this is that we cannot represent |
| 4 | +all possible trees; specifically the following are known to cause problems: |
| 5 | +
|
| 6 | +Text or comments as siblings of the root element |
| 7 | +Docypes with no name |
| 8 | +
|
| 9 | +When any of these things occur, we emit a DataLossWarning |
| 10 | +""" |
| 11 | + |
1 | 12 | importwarnings |
2 | 13 | importre |
3 | 14 |
|
|
15 | 26 | fullTree=True |
16 | 27 | tag_regexp=re.compile("{([^}]*)}(.*)") |
17 | 28 |
|
18 | | -"""Module for supporting the lxml.etree library. The idea here is to use as much |
19 | | -of the native library as possible, without using fragile hacks like custom element |
20 | | -names that break between releases. The downside of this is that we cannot represent |
21 | | -all possible trees; specifically the following are known to cause problems: |
22 | | -
|
23 | | -Text or comments as siblings of the root element |
24 | | -Docypes with no name |
25 | | -
|
26 | | -When any of these things occur, we emit a DataLossWarning |
27 | | -""" |
28 | 29 |
|
29 | 30 | classDocumentType(object): |
30 | 31 | def__init__(self,name,publicId,systemId): |
|