[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


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"?>
    Hello, World!
          <!-- Commentary -->
          <Data1> Some data </Data1>
          <Data2> More data </Data2>

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

   referenceNode = xmlSecSignedInfoAddReference(signedInfoNode,
                         "<XPath> ancestor-or-self::Data1 </XPath>",

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
Error: signature failed

Any idea what's wrong?

Help appreciated

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

More information about the xmlsec mailing list