Hi,

I have this code (below) which is running inside a command but it won't have
any effect!! (actualy it does but not permanent....)
When I do a System.out.println(statusAttribute.value) I will see the value
which i entered but when I check the attribute editor the old value is still
in it and also when I save the file the value won't be saved with the
attribute included.

-------Code-------
XPath xp = XPath.fromString("/article/@status", null);
Object[] obj = xp.select(doc.getRootElement());
Attribute statusAttribute = (Attribute) obj[(obj.length - 1)];
statusAttribute.value = "000_111_000";
-------Code--------

P.S. the obj is not null. Obj.length is always 1 so the item from the Object
array is the item at position 0.

What is wrong with te code? I looks like the "master model" won't be updated
when I alter the value. This is obvious because the value is a Public string
variable which is accessed directly

Greet,
Stefan

Finalist IT Group
Java Specialists
-------------------------------------------------------------
Amsterdam, The Netherlands                          
Office:         +31 20 596 23 30
Fax:    +31 20 596 23 31
Web:    http://finalist.com <http://finalist.com> 
------------------------------------------------------------- 
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
-------------------------------------------------------------
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20030922/b19db79a/attachment.htm
 

Reply via email to