[xml] Attributes without knowing name



I'm working on an XML cryptographic signer, both in Java and in C++. The
Java version (Using Xerces) is finished, but I have now hit a problem in the
C++ version (Using libxml).

When signing, the string that is signed must be identical to the one which
is checked at some later time. The problem with this and XML is that
attribute order isn't important, and libxml and Xerces orders them
diffrently, so I need to sort them. The signer must be general, so it
shouldn't need to know the names of the attributes in the given element. So,
I need to get all the attributes from an element without knowing the names
of these attributes. I was looking at the documentation, for something like:

xmlGetPropCount(xmlNodePtr node);

and

xmlGetProp(xmlNodePtr node, int index);

... but I couldn't find anything like this, or anything that could do the
job. Is what I'm attempting possible, and if so, how?

*********************************************************
Christian Rygg          -       EDB Fellesdata
Avd. for sikkerhet      -       Bergen
Telefon                 -       55204658
Mobil                   -       92433995
*********************************************************




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]