You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Haneef Ali <ha...@rgellx30.rgv.hp.com> on 2001/03/09 19:16:15 UTC

How do this ? ( namespace)


Hi,

I want to create the following ,but Iam always getting  namespace error. Can
some one let me
know what is wrong here

<Envelope  xmlns="urn:uddi-org:api"  xmlns:soapEnc="some url" >
	......
</Envelope>

Document doc = new org.apache.xerces.dom.DocumentImpl ();
Element envelope = doc.createElementNS ( "urn:uddi-org:api","Envelope"  );

// Upto this every thing is ok

Now how to add the namespace . My understanding is that it is same as adding
attribute

envelope.setAttributeNS("urn:uddi-org:api", "xmlns" , "urn:uddi-org:api");

The above line throws NamespaceError DOM003.

Pls let me know how to create this simple document

Thanks
Haneef


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org