Space is not a legal name character and an implementation is required by the
DOM spec to throw an exception if you try to create an element with an
illegal name. See
http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-2141741547
Can your application recover from the problem, if so, then you should catch
the exception. For example, if your user typed something in and you tried
to create the element you could do something like:
bool status = false;
do {
status = true;
try {
Element elem = doc.createElement(badString);
}
catch(DOM_DOMException &ex) {
if(ex.code == INVALID_CHARACTER_ERR)
ShowErrorDialog("You must enter a valid XML start tag");
status = false;
}
while(!status);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]