Hi Juraj,
 
I'm not sure what you are trying to do, but a Namespace Node is in fact a special Attribute Node (however, it does not extend Attribute). For instance: if you create a Namespace Node (prefix: "mypref", uri: "myuri") and add it to an Element, in the corresponding XML that element will have an attribute xmlns:mypref="myuri".
 
So, it's pretty obvious you can't set the text of a Namespace Node.
 
I think you want to create an Element that has a Namespace declaration:
 
<parent>
  <tsixmlcompare xmlns="http://www.fdhhfd.com/sdgsdg">ADD</tsixmlcompare>
</parent>
 
To create the above element: do something like this:
 
Element parent = [...];
Element child = parent.addElement("tsixmlcompare", http://www.fdhhfd.com/sdgsdg);
child.setText("ADD");
 
regards,
Maarten


[EMAIL PROTECTED] wrote:
Hello,

I am creating a new document and want to add a Namespace Node to an element. This part is working fine. Now I want to set a value/text to this Namespace. The setTExt methods throws an UnsupportedException, because the Namespace is readOnly. Can someone tell me, why and how to set the text?

Namespace nNew = new Namespace("tsixmlcompare","http://www.fdhhfd.com/sdgsdg");
nNew.setText("ADD");

Thanks,
Juraj


-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user


Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.

Reply via email to