SV: [jdom-interest] Why do I get xmlns="" ?

Per Norrman pernorrman at telia.com
Tue Nov 18 17:19:56 PST 2003


Because the namehunterScore element is in no namespace, and
because you're establishing a previously undeclared namespace 
'context'.

/pmn



-----Ursprungligt meddelande-----
Från: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org]
För Hainer, Neil
Skickat: den 19 november 2003 01:55
Till: jdom-interest at jdom.org
Ämne: [jdom-interest] Why do I get xmlns="" ?


Hi,


The following code snippet:

 Element description = new Element( "Description", rdfNameSpace );
description.setAttribute( "about", rdfID + "-" + counter + "a",
rdfNameSpace );
 description.addContent( "    \n" );
 Element namehunterScore = new Element( "namehunterScore" );
namehunterScore.setText( score );
 description.addContent( "        " );
 description.addContent( namehunterScore );
 description.addContent( "\n    " );

produces the following output:

    <rdf:Description rdf:about="TPM08785-2a">    
        <namehunterScore xmlns="">1.000000</namehunterScore>
    </rdf:Description>

why does the namehunterScore element contain the attribute xmlns=""?

I am using the beta9 release of JDOM.

TIA,

Neil


_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@you
rhost.com




More information about the jdom-interest mailing list