Backwards compatibility, additional data, uninitialized data members

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Backwards compatibility, additional data, uninitialized data members

Joe Gordon
Hello and thanks for a great product! There are two
outstanding issues with me using xstream in my
application.

1) I'd like to be able to send any XML to xstream. If
the classes don't exist, file malformated xml in a
report. If the classes contain extra info, file
malformated xml in a report and continue skipping
problem.

2) I'd like to be able to guarantee that variables
that are not present in XML will have an initial value
rather than an uninitialized value.

A cursory look at the source indicates that (1) may be
somewhat simpler. I'm planning to dig through the
source and see if this can be accomplished. Which
bodes some questions:

1) Any pointers on where to start?

2) Are these features planned in an upcoming release?

3) If I am successful, would you folks, like my
additions?

Thanks Again,

Joseph Gordon

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: Backwards compatibility, additional data, uninitialized data members

Rickard Öberg
Joe Gordon wrote:

> Hello and thanks for a great product! There are two
> outstanding issues with me using xstream in my
> application.
>
> 1) I'd like to be able to send any XML to xstream. If
> the classes don't exist, file malformated xml in a
> report. If the classes contain extra info, file
> malformated xml in a report and continue skipping
> problem.
>
> 2) I'd like to be able to guarantee that variables
> that are not present in XML will have an initial value
> rather than an uninitialized value.
>
> A cursory look at the source indicates that (1) may be
> somewhat simpler. I'm planning to dig through the
> source and see if this can be accomplished. Which
> bodes some questions:
>
> 1) Any pointers on where to start?
>
> 2) Are these features planned in an upcoming release?
>
> 3) If I am successful, would you folks, like my
> additions?
I generally approach all my data evolution and fix-things-up using XSL.
In other words, put an XSL between the raw XML input and XStream, and
have it contain all the rules you need to change classes, add default
values, change types, names, etc. Since it can do literally ANY kind of
weird data transformation change it's worth it.

/Rickard

--
Rickard Öberg
[hidden email]
@work +46-(0)19-173036