You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/04/02 16:49:36 UTC

DO NOT REPLY [Bug 7687] New: - createElementNS

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7687>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7687

createElementNS 

           Summary: createElementNS
           Product: Xerces2-J
           Version: 2.0.1
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: ankur.saigal@sap.com


Hi,
I am using XERCES 2.0.1 release and I am facing some problems while 
using "createElementNS" method on the document object.
As per the JAXP specifications the method is supposed to create a namespace 
node attribute in the resultant Element, but XERCES doesnot behave as intended 
here i.e the namespace node is not created.
To give a small example,

If I have this piece of code,
            DocumentBuilderFactory dbf =
            DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document tmpDoc=db.newDocument();
            Element rootElem=tmpDoc.createElementNS("urn:mic.com:CRM- 
Middleware:SandBox:Map","ma:validate");
            Elemnt tmpElem = tmpDoc.createElementNS("urn:mic.com:CRM-
Middleware:SandBox:Map","ma:validateResult");
            rootElem.appendChild(tmpElem.cloneNode());
            tmpDoc.appendChild(rootElem.cloneNode());


then the output which I get is 

<?xml version="1.0" encoding="utf-8"?>
	<ma:validate xmlns:ma="urn:sap.com:CRM-Middleware:MapBox:Map">
		<ma:validateResult/>
	</ma:validate> 

<<<<<<<no namespace attribute node created>>>>>>

and NOT..
 <?xml version="1.0" encoding="utf-8"?>
	<ma:validate xmlns:ma="urn:sap.com:CRM-Middleware:MapBox:Map">
		<ma:validateResult xmlns:ma="urn:sap.com:CRM-
Middleware:MapBox:Map"/>
	</ma:validate> 
Regards,
Ankur

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