You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Jeff Lusted <jl...@star.le.ac.uk> on 2007/08/03 15:07:57 UTC

Re: Error setting version property in XmlObject (XmlValueOutOfRangeException)

Hi Abhinav!

On Wed, 2007-08-01 at 14:25 +0530, Abhinav Garg wrote:
> Now, I'm trying to set the version in the Document object like
> 
> doc.setVersion(org.fpml.x2005.fpML42.Document.Version.X_4_2);
> 
> But, it throws a XmlValueOutOfRangeException 

> 
> To eradicate this, I tried doing something like this before setting
> the version:
> 
> doc.changeType(org.fpml.x2005.fpML42.Document.Version.type);
> 
> But, then it throws a XmlValueDisconnectedException
> 

Sorry, I haven't been through all the code you made available. But you
might try this as a variation...

doc = (Document)doc.changeType( org.fpml.x2005.fpML42.Document.type ) ;
doc.setVersion(org.fpml.x2005.fpML42.Document.Version.X_4_2);

Regards
Jeff
-- 
Jeff Lusted               tel: +44 (0)116 252 5358
Astrogrid Project         mob: +44 (0)7973 492290
Dept Physics & Astronomy  email: jl99@star.le.ac.uk
University of Leicester   web: http://www.astrogrid.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org