Jack,
I just opened up the source code to have a quick look - one thing I noticed is that you are using DOM Level 1 calls for adding attributes. I've had problems with that myself, so I'm wondering if that is where the issue is.
Rather than call setAttribute(name, value) Try setAttributeNS(NULL, name, value);
I've noticed that Xerces sometimes doesn't pick up attributes for serialisation when they are added via L1 calls. (The NS call is a Level 2 call.)
Cheers, Berin
Jack Zhang wrote:
Hi Berin,
I wrote a test program to demonstrate this problem, see attachment.
BTW, the Xerces I used is 2.4, I haven't attach the related dll because it's too large.
Thansk for your help Jack
----- Original Message ----- From: "Berin Lautenbach" <[EMAIL PROTECTED]> To: <security-dev@xml.apache.org> Sent: Friday, December 24, 2004 12:34 PM Subject: Re: Is this a bug? (C++ Version)
It definitely doesn't sound right. Can you attach a snippet of code (preferably self contained - i.e. it should compile) that shows the problem and send it to me?
Cheers, Berin
张 简化 wrote:
Hi There,
I append a new child node to the DOM document,
1. The new node has no child node.
2. The new node have several attributes (I use setAttribute function
to
set the attributes)
After I encrypt the DOM document, then load the enrypt document again and decrypt it, found only one attribute was left, other attibutes
were
lost.
Before encrypt the DOM document, I have save the document, the saved
xml
file is right.
BTW, if don't use appendChild to append new node, just set attribute
of
an exist node, no this problem.
Is this a bug of XML Security C++ version?
Regards
Jack
------------------------------------------------------------------------
使用世界上最大的电子邮件系统— MSN Hotmail <http://g.msn.com/8HMACNCN/2752??PS=47575> Get 2 months FREE*.