[jdom-interest] Namespace

Alex Rosen arosen at silverstream.com
Wed Aug 1 07:24:31 PDT 2001


There's a FAQ entry about Namespaces on jdom.org that talks about this.
 
Alex

-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Sparkes, Peter
Sent: Wednesday, August 01, 2001 4:53 AM
To: 'jdom-interest at jdom.org'
Subject: [jdom-interest] Namespace



Hi, 

Namespace topicMapNS = Namespace.getNamespace("
http://www.topicmaps.org/xtm/1.0/ <http://www.topicmaps.org/xtm/1.0/>
"); 
Element topicMap = new Element("topicMap", topicMapNS); 
topicMap.addContent(new Element("topic") 
                   .setText("Topic Maps")); 

Gives me: 

<topicMap xmlns=" http://www.topicmaps.org/xtm/1.0/
<http://www.topicmaps.org/xtm/1.0/> "> 
  <topic xmlns="">Topic Maps</topic> 
</topicMap> 

The "xmlns" attribute on element "topic" is not wanted. 

Please, what am I doing wrong. 

Peter Sparkes 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20010801/9881681d/attachment.htm


More information about the jdom-interest mailing list