Spaces are not allowed in elements names. For more details, see the XML
recommendation:
http://www.w3.org/TR/1998/REC-xml-19980210#NT-Name
If you want your application to handle such problems gracefully, then
you'll need a try/catch block for DOM_Exception:
try
{
...
}
catch(const DOM_Exception& exception)
{
...
}
There should be more code in the samples.
Dave
Wyles Eric -
ewyles To: "'[EMAIL PROTECTED]'"
<Eric.Wyles@a <[EMAIL PROTECTED]>
cxiom.com> cc: (bcc: David N Bertoni/CAM/Lotus)
Subject: Exceptions on createElement with
07/12/2001 spaces
06:02 PM
Please
respond to
xerces-c-dev
Hi,
This may be more of a question about XML/DOM standards than a Xerces
question, but I figured I could get it answered here either way.
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
stumbled upon this by accident as I didn't really mean to be creating
elements (I mean to be creating text nodes), but since I hit the problem I
thought I'd bring it up.
Are spaces not allowed in element names? If not, should I be catching
exceptions that come from the DOM_Document::createElement calls? The
exceptions are "Microsoft C++ Expections".
Thanks,
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]