[xmlsec] Can't get XPath to work

Hans-Juergen.Heinrich at de.gi-de.com Hans-Juergen.Heinrich at de.gi-de.com
Wed Jun 5 07:04:44 PDT 2002


Hi,

Although there was already a recommendation on how to use
XPath, I can't get it to work in xmlsec.
I have the following XML-file:

<?xml version="1.0" encoding="UTF-8"?>
<Letter>
    Hello, World!
    <Info>
          <!-- Commentary -->
          <Data1> Some data </Data1>
          <Data2> More data </Data2>
     </Info>
</Letter>

I create a reference node like this (assuming I only want to sign
the <Data1> node and its contents):

   referenceNode = xmlSecSignedInfoAddReference(signedInfoNode,
                         "my-reference",
                         "<XPath> ancestor-or-self::Data1 </XPath>",
                         NULL);

This corresponds to the recommendation in one of the mails in the list.
However, I always end up with:

warning: failed to load external entity "<XPath> ancestor-or-self::Data1
</XPath
>"
Error: signature failed

Any idea what's wrong?

Help appreciated
Hans-Juergen

----------------------------------
Dr. Hans-Jürgen Heinrich
System engineer, 4TE3
Giesecke & Devrient GmbH, Truderinger Straße 15, D-81607 München
Phone:  +49 89 4119-2625, FAX:     +49 89 4119-1629
mailto:hans-juergen.heinrich at de.gi-de.com
http://www.gieseckedevrient.com




More information about the xmlsec mailing list