Keith,
Thanks for your input in this and other mail. The lack of reference tracking seems to be a huge drawback since with any non-trivial object tree there will be more than one reference to any given instance. I suppose that it's possible that I could create Vector of all the live objects and then archive the graph as references, but that seems like a huge hack.
One more comment below:
On 05/24/04 15:44:19, Keith Visco wrote:
The XMLSerializer is correct in throwing an error with (char)0 since it's not a valid XML character.
True it's not a valid XML character, but it _is_ a valid Java character.
There is little we can do about that, the character simply cannot exist in an xml document.
What this says is that in order to use Castor as an archiver the programmer has to ensure that any getChar method returns a valid XML character - quite a restriction. I think that it would be reasonable for a user to expect that Java-valid, but XML-invalid characters would be encoded.
I haven't tested Strings, but most non-English languages produce characters that are not valid XML and so must be Base64 encoded to be stored in a valid XML file. Is this something Castor does, or is this also passed back to the user (sorry for this newbie question).
Jim
>
> There seems to be a problem with archiving characters that are not
> valid XML characters. For example, and object with this (and it's
set
> sibling):
>
> [...]
> public char getCharValue () {
> return (char)0;
> }
> [...]
>
> generates and error from the XMLSerializer.
>
> I also hit an error that I notice has been reported elsewhere, >where validation generates a NullPointerException (I'd get you the >exact error, but non-Castor problems prevent me for running the >app). If I can find more details, I'll pass them along.
-- Jim Redman (505) 662 5156 x85 http://www.ergotech.com
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
