|
|
Home » U++ Library support » U++ Core » More Xmlize functions
More Xmlize functions [message #25404] |
Mon, 22 February 2010 09:02  |
 |
koldo
Messages: 3435 Registered: August 2008
|
Senior Veteran |
|
|
Hello all
Xmlize functions are a nice way to get serialization using instead of a raw binary file, a XML file.
Advantages are:
- If you change your classes design, .xml data saved is read properly so your old .xml files are useful.
- They integrate very well with code
- Serialization file is a readable .xml file
Now Xmlize.c /.h supports many classes. However some classes and types are not included yet:
- int16
- byte
- Date
- Time
- DropList
- DropTime
- DropDate
- EditDouble
- Option
I have included new files Xmlize2.c / .h to support these types and classes.
If you want to use them just insert Xmlize2.c int your files and #include Xmlize2.h.
Of course they could be integrated in Core Xmlize.c /.h files .
-
Attachment: Xmlize2.7z
(Size: 0.82KB, Downloaded 285 times)
Best regards
Iñaki
[Updated on: Mon, 22 February 2010 13:17] Report message to a moderator
|
|
|
|
|
Re: More Xmlize functions [message #25413 is a reply to message #25408] |
Mon, 22 February 2010 12:26   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
koldo wrote on Mon, 22 February 2010 04:25 |
luzr wrote on Mon, 22 February 2010 09:16 |
koldo wrote on Mon, 22 February 2010 03:02 | Hello all
Xmlize functions are a nice way to get serialization using instead of a raw binary file, a XML file.
Advantages are:
- If you change your classes design, .xml data saved is read properly so your old .xml files are useful.
- They integrate very well with code
- Serialization file is a readable .xml file
Now Xmlize.c /.h supports many classes. However some classes and types are not included yet:
- int16
- byte
- Date
- Time
- DropList
- DropTime
- DropDate
- EditDouble
- Option
I have included new files Xmlize2.c / .h to support these types and classes.
If you want to use them just insert Xmlize2.c int your files and #include Xmlize2.h.
Of course they could be integrated in Core Xmlize.c /.h files .
|
Are you sure about implementing the time/date this way?
Maybe we should rather use XmlRpc format? (You can see that in XmlRpc package).
Mirek
|
Hello Mirek
I thought XmlRpc protocol was not related with serialization.
Anyway if we do not have to use Xmlize it would be better to label it as deprecated. I have spent some hours in it until now.
If it is worthwhile to use it, please indicate me your way to implement time/date.
|
Ops, nope. What I was saying that perhaps text format used in XmlRpc to represent the date with single attribute is better than to implement it with several.
See:
http://en.wikipedia.org/wiki/XML-RPC
they use
<dateTime.iso8601>19980717T14:08:55</dateTime.iso8601>
of course, in Xmlize, this might be something like
<id value="19980717T14:08:55">
Mirek
|
|
|
Re: More Xmlize functions [message #25414 is a reply to message #25413] |
Mon, 22 February 2010 12:41   |
 |
koldo
Messages: 3435 Registered: August 2008
|
Senior Veteran |
|
|
luzr wrote on Mon, 22 February 2010 12:26 |
koldo wrote on Mon, 22 February 2010 04:25 |
luzr wrote on Mon, 22 February 2010 09:16 |
koldo wrote on Mon, 22 February 2010 03:02 | Hello all
Xmlize functions are a nice way to get serialization using instead of a raw binary file, a XML file.
Advantages are:
- If you change your classes design, .xml data saved is read properly so your old .xml files are useful.
- They integrate very well with code
- Serialization file is a readable .xml file
Now Xmlize.c /.h supports many classes. However some classes and types are not included yet:
- int16
- byte
- Date
- Time
- DropList
- DropTime
- DropDate
- EditDouble
- Option
I have included new files Xmlize2.c / .h to support these types and classes.
If you want to use them just insert Xmlize2.c int your files and #include Xmlize2.h.
Of course they could be integrated in Core Xmlize.c /.h files .
|
Are you sure about implementing the time/date this way?
Maybe we should rather use XmlRpc format? (You can see that in XmlRpc package).
Mirek
|
Hello Mirek
I thought XmlRpc protocol was not related with serialization.
Anyway if we do not have to use Xmlize it would be better to label it as deprecated. I have spent some hours in it until now.
If it is worthwhile to use it, please indicate me your way to implement time/date.
|
Ops, nope. What I was saying that perhaps text format used in XmlRpc to represent the date with single attribute is better than to implement it with several.
See:
http://en.wikipedia.org/wiki/XML-RPC
they use
<dateTime.iso8601>19980717T14:08:55</dateTime.iso8601>
of course, in Xmlize, this might be something like
<id value="19980717T14:08:55">
Mirek
|
Sorry for the misunderstanding 
It makes sense. I will change it.
Best regards
Iñaki
|
|
|
Re: More Xmlize functions [message #25416 is a reply to message #25414] |
Mon, 22 February 2010 13:19   |
 |
koldo
Messages: 3435 Registered: August 2008
|
Senior Veteran |
|
|
koldo wrote on Mon, 22 February 2010 12:41 |
luzr wrote on Mon, 22 February 2010 12:26 |
koldo wrote on Mon, 22 February 2010 04:25 |
luzr wrote on Mon, 22 February 2010 09:16 |
koldo wrote on Mon, 22 February 2010 03:02 | Hello all
Xmlize functions are a nice way to get serialization using instead of a raw binary file, a XML file.
Advantages are:
- If you change your classes design, .xml data saved is read properly so your old .xml files are useful.
- They integrate very well with code
- Serialization file is a readable .xml file
Now Xmlize.c /.h supports many classes. However some classes and types are not included yet:
- int16
- byte
- Date
- Time
- DropList
- DropTime
- DropDate
- EditDouble
- Option
I have included new files Xmlize2.c / .h to support these types and classes.
If you want to use them just insert Xmlize2.c int your files and #include Xmlize2.h.
Of course they could be integrated in Core Xmlize.c /.h files .
|
Are you sure about implementing the time/date this way?
Maybe we should rather use XmlRpc format? (You can see that in XmlRpc package).
Mirek
|
Hello Mirek
I thought XmlRpc protocol was not related with serialization.
Anyway if we do not have to use Xmlize it would be better to label it as deprecated. I have spent some hours in it until now.
If it is worthwhile to use it, please indicate me your way to implement time/date.
|
Ops, nope. What I was saying that perhaps text format used in XmlRpc to represent the date with single attribute is better than to implement it with several.
See:
http://en.wikipedia.org/wiki/XML-RPC
they use
<dateTime.iso8601>19980717T14:08:55</dateTime.iso8601>
of course, in Xmlize, this might be something like
<id value="19980717T14:08:55">
Mirek
|
Sorry for the misunderstanding 
It makes sense. I will change it.
|
Hello all
It is done. New version of Xmlize2.7z is included in previous post.
Best regards
Iñaki
|
|
|
|
|
|
|
Re: More Xmlize functions [message #25554 is a reply to message #25532] |
Mon, 01 March 2010 11:17  |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Sun, 28 February 2010 09:28 |
mdelfede wrote on Sat, 27 February 2010 17:51 | Well, mostly because I needed some processing on ctrls loading.
My xmlizers were mostly aimed to solve a concrete problem, they are not generic ones.
BTW, I think it would be good to incorporate xmlize into ctrl, and to add OnLoad / OnStore handlers, I guess it could solve most streaming issues.
Ciao
Max
|
That would mean all XML stuff gets always linked in. Something I am not really happy about...
|
Anyways, I don't think a generic ctrl Xmlizer would be very useful, at least, not a simple one. With the OnLoad/OnStore handlers( btw, you'd need a BeforeStore and AfterLoad ones, to be precise...) things would be better, but you'd have to link xml everywhere.
But, with Value xmlized now, to store/load controls becomes trivial.
A generic xmlizer would have problems, for example, with droplists which content depends/links to other controls which are in turn xmlized. On my code, most of the work is to keep in sync all that, not the streaming code itself which is really trivial.
More, In my code I store/internally use values in a single set of units (for example, Newton, mm, N/mm2, and so on) converting on the fly between textual controls contents which is user-customizable. So, when streaming in/out controls I have to perform such conversion, too.
That would be hardly achieved by a generic Xmlizer.
Ciao
Max
|
|
|
Goto Forum:
Current Time: Sun May 11 09:04:00 CEST 2025
Total time taken to generate the page: 0.03052 seconds
|
|
|