| 55 | ==== XML libraries, XPath and Canonicalization ==== |
| 56 | ZSI provides an !ElementProxy class interface for XML handling for SOAP messages. This inherits from a MessageInterface class. This would seem to enable the underlying Python XML libraries used to be changed easily. By default it uses !PyXML DOM library. pyGridWare makes use of the 4Suite add-ons for extra performance. |
| 57 | |
| 58 | Implementations for XPath and Canonicalization are important factors for consideration. There is a DOM based canonicalization algorithm available with ZSI. - Doesn't work with mini-dom?? - |
| 59 | |
| 60 | ElementTree has been used project wide for NDG, prefered for its fast performance and pythonic style interface. However, there doesn't appear to be a canonicalization algorithm available for it or XPath support for attribute searches. `findall` can be used to search for elements but not element attributes. The latter is important with WS-Security for locating elements in the SOAP message for signatures or encryption. |
| 61 | |
| 62 | pyGridWare includes an !ElementTree based !ElementProxy class but this appears to be incomplete. There is no canonicalization method and other issues resolve. |
| 63 | |
| 64 | lxml is an implementation of the !ElementTree API but using libxml2 and xslt underneath (http://www.thescripts.com/forum/thread162575.html). XPath and canonicalization are supported. Performance appears to be comparable. |
| 65 | |
| 66 | http://codespeak.net/lxml/ |
| 67 | |
| 68 | The drawback is the addition of more dependencies. A core objective is to reduce the number of dependencies :/ |
| 69 | |