OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Namespace declaration using DOM

[ Lists Home | Date Index | Thread Index ]

Christian Nentwich wrote:
> 
>><RootElement xmlns:c="http://pradeepbhat.com";>
>><c:name>pradeep</c:name>
>><RootElement>
>>My problem is how to put the xml name space declaration in RootElement.
>>Some one plz help;
> 
> 
> root.setAttribute("xmlns:c","http://pradeepbhat.com";);
> 

I don't think this is correct. Namespaces are *not* attributes.
You'll have to create the c:name element using
   createElementNS("http://pradeepbhat.com","c:name";);
(there may be other possibilities)

J.Pietschmann





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS