Hi all,
I'm trying to "migrate" some old C++ Code from Xerces 1.7.0 to Xerces
2.5.0 using the includes from the directory /dom/deprecated instead of
using the new classes. Now the application crashes. 

Here the code:

DOM_Document domDoc;
DOM_Node parent;

...

// parent created, the path is "CMF/Trade/Product/Identifiers"

DOM_Element element = domDoc.createElement(name); // name may be empty
-> name = ""
DOM_Text text = domDoc.createTextNode(value); // value may be empty ->
value = ""
element.appendChild(text);
parent.appendChild(element);


When the variables name and value were an empty string, on xerces 1.7.0
we got an empty-element tag:

...<Product><Identifiers/></Product>..

but on xerces 2.5.0 the method DOM_Document::createElement() crashes
because of XMLChar1_0::isValidName()

DOM_Document::createElement() -> DocumentImpl::createElement() ->
XMLChar1_0::isValidName()

I couldn't find anything about this in the migration specs or in the
faq.

May somebody tell me if it is not allowed anymore to call
createElement() with an empty string and if not allowed, how to generate
the empty-element tag?

Regards
S. Piras

Reply via email to