[jdom-interest] Question Regarding NameSpace

Kesav Kumar kesavk at voquette.com
Tue Oct 10 19:16:44 PDT 2000


 
 Hi
 
 I am using extensively JDOM in my current project.  Till now every thig was
 working fine with JDOM Beta5.  Now I have got a problem in creating
Document
 with specific Namespace.   I have an existing XML contains lots of
templates
 I wanted to create a document with one of the template and add Namespace to
 it?  I am not finding any way to add Namespace to Document.  Can you
suggest
 any way?  I am using SAXBuilder for parsing the document and JDOM Version
is Beta5.
I am giving my sample templates
 
 <templates>
 
         <Template1 xmlns:xpl="www.xxx.com" xmlns:xplt="www.xxx.com">
                 <xpl:node1/>
                 <xplt:node2/>
         </Template1>
 
         <Template1 xmlns:xpl="www.xxx.com" xmlns:xplt="www.xxx.com">
                 <xpl:node1/>
                 <xplt:node2/>
         </Template1>
 </templates>
 
 From the above input xml file I want a document like the below
 
 <Template1 xmlns:xpl="www.xxx.com" xmlns:xplt="www.xxx.com">
         <xpl:node1/>
         <xplt:node2/>
 </Template1>
 
 Right now After creating new Element I am getting the document in the
 following manner
 <Template1>
         <xpl:node1 xmlns:xpl="www.xxx.com"/>
         <xplt:node2 xmlns:xpl="www.xxx.com"/>
 </Template1>
 
 Is there any way to get in the above manner?  Plz I tried alot with
 different options but nothing worked out.
 
 A help on this is very helpful
 
 Thanks


Kesav Kumar
Software Engineer
Voquette, Inc.
650 356 3740
mailto:kesavk at voquette.com
http://www.voquette.com




More information about the jdom-interest mailing list