> I am using xerces 1.4 on win32 and I get exceptions whenever I try to use
> the DOM_Document::createElement if my element name contains spaces. I really
: :
> Are spaces not allowed in element names?
As you suspect, spaces are _not_ allowed in element names. Element
names must be NCNames.
An NCName [xmlns-4] starts with a letter or an underscore, and
then zero or more NCNameChars.
An NCNameChar [xmlns-5] is a letter, underscore, digit, period,
dash, combining character [xml-87] or extender [xml-89].
The last two are sets of Unicode characters, none of which are a
space. ;-)
> If not, should I be catching exceptions that come from the DOM_Element::
> createElement calls?
I'm not clear when you say "Microsoft C++ Exceptions" whether
you mean:
(i) "first-chance exceptions" in the IDDE, which are either errors
that were caught in an attached process, or errors waiting to pop
up a nasty dialog box on your screen.
(ii) "structured exception handling" (SEH) exceptions which was
Microsoft's way of handling exceptions with extended keywords
before ANSI C++ standardized matters.
(iii) ANSI C++ Exceptions (in which case the Microsoft appelation
is unnecessary).
I'd recommend not passing non-NCNames to DOM_Element::
createElement( ) to begin with. As you mentioned, you wanted
to create a text node. Create a new DOM_Text object and pass
it to your DOM_Element using DOM_Element::appendChild( ).
Derek Harmon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]