You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Rocky Raccoon <rr...@bigfoot.com> on 2000/05/19 01:05:10 UTC
Namespaces
Hi,
When I execute the foll code.
DOM_DOMImplementation impl;
DOM_Document doc = impl.createDocument( 0, "abc:pqr",
DOM_DocumentType());
it crashes.
How do I turn on namespace processing ?
Re: Namespaces
Posted by Andy Heninger <an...@jtcsv.com>.
In the DOM, namespace processing is always available. Where
namespace and non-namespace operations would produce different
results, DOM Level 2 defined new methods for use with
namespaces.
In your code snippit, creating a document with a namespace
prefix, but with a null Namespace URI string, is an error
condition that results in a NAMESPACE_ERR DOM exception
being thrown. Try catching the DOM exceptions - the
uncaught exception is probably what you are seeing.
Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com
----- Original Message -----
From: "Rocky Raccoon" <rr...@bigfoot.com>
> When I execute the foll code.
> DOM_DOMImplementation impl;
> DOM_Document doc = impl.createDocument( 0, "abc:pqr",
> DOM_DocumentType());
>
> it crashes.
>
> How do I turn on namespace processing ?
>