[XML-SIG] Getting Started

Rich Salz rsalz@zolera.com
Sat, 17 Nov 2001 10:34:44 -0500


And here's n+1 :)

We have a simple set of objects that are useful to build small DOM-like
objects.
You declare the tree structure, and then call "build" passing in a
dictionary where the real values come from.  For example:
    sigdoc_tree = XMLNode("Signature", nsattrs=[(None, DSIG.BASE)],
children=[
        XMLNode("SignatureValue", data="<SignatureValue>"),
        XMLNode("KeyInfo", children=[
          XMLNode("X509Data", children=[
            XMLNode("X509SubjectName", data="<X509SubjectName>"),
            XMLNode("X509Certificate", data="<X509Certificate>"),
          ] ),
          XMLNode("KeyName", data="<KeyName>")
        ]),
        sigprop_obj
      ])

You then call sigdoc_tree.build() with a dictionary where the <tags> are
keys.

It's "good enough" to work with PyXML's xpath and some 4DOM stuff (like
replaceChild).
It's built on an API that is simpler than the DOM-building API.

We'd be happy to open-source it, if there's interest.
	/r$

-- 
Zolera Systems, Securing web services (XML, SOAP, Signatures,
Encryption)
http://www.zolera.com