Hi Group,

Using:
Xerces-C 2.7.0 (downloaded today xerces-current.zip and compiled it fresh)
MSVC 7.1
Windows XP

Problem:
If i set a value of an attribute node with a string that contains special
characters like this:

...
Strcpy(key, "test");
strcpy(value, "Abc < def > ghi & jkl ' mno \" pqr <= stu >= vwx =< zzz =>
aaa");
...
void dom_SetAttr(DOMNode *node, char *key, char *value)
{
    DOMElement *el;
    
    // Do we have an element node?
    if(node->getNodeType() == DOM_ELEMENT_NODE)
    {
        // Yepp! Go ahead with setting the attribute
        el = (DOMElement *) node;
        el->setAttribute(X(key), X(value));
    }
}

and serialize the document afterwards, i expect to get the following
attribut value in the saved document file:

test="Abc &lt; def &gt; ghi &amp; jkl &apos; mno &quot; pqr &lt;= stu &gt;=
vwx =&lt; zzz =&gt; aaa"

But i get this:

Test="Abc &lt; def > ghi &amp; jkl ' mno &quot; pqr &lt;= stu >= vwx =&lt;
zzz => aaa"

You see, all special characters are translated in their entities except the
"greater than" sign and the apostroph.

Do i sth. wrong, or am i missing sth. (setting a feature or whatsoever) or
is this a bug?

I really would appreciate a hint or a point in the right direction how
making this work. I have nothing found on the list and/or web or docs.

Thanx in advance for your time and answers
Joerg Toellner


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to