[xmlsec] Using XPath
Aleksey Sanin
aleksey at aleksey.com
Fri Nov 1 10:23:09 PST 2002
You have a clear error in the XPath. Try this:
ancestor-or-self::dsig:Signature
And have you checked this resource:
http://www.zvon.org/index.php?nav_id=tutorials
Aleksey
Gregor Ibic wrote:
>Nope. I get syntac error. I tried also this. Its in Delphi but uses the same
>libxml.
>
> (doc.documentElement As IDomNodeSelect).registerNs('dsig',
>'http://www.w3.org/2000/09/xmldsig#');
> bodyNodes := (doc.documentElement As IDomNodeSelect).selectNodes(
> 'ancestor-or-self::dsig://Signature'
> );
>
>or with
>
>ancestor-or-self::/Request/dsig:Signature
>
>XML is now:
>
><?xml version="1.0" encoding="UTF-8" ?>
><Request>
> <DataObject Id="object">abcšd</DataObject>
> <Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
> <SignedInfo>
> <CanonicalizationMethod
>Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
> <SignatureMethod
>Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
> <Reference URI="#object">
> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
> <DigestValue></DigestValue>
> </Reference>
> </SignedInfo>
> <SignatureValue>
> </SignatureValue>
> <KeyInfo>
> <KeyName></KeyName>
> </KeyInfo>
> </Signature>
></Request>
>
>Uh, Im really tired of experimenting.
>Is there any good source of examples beside the w3c standards?
>
>Regards,
>Gregor
>
>_______________________________________________
>xmlsec mailing list
>xmlsec at aleksey.com
>http://www.aleksey.com/mailman/listinfo/xmlsec
>
>
More information about the xmlsec
mailing list