[Yanel-dev] Handling of XML Serialization

simon simon at 333.ch
Wed Jan 5 18:00:06 CET 2011


Am 22.10.2010 15:19, schrieb basZero:
> Dear all,
>
> having worked with Yanel for some weeks now, I noticed that very often
> people still deal with Document objects, append children, deal with
> namespaces and have to care about inheritance by themselves.
>
> In some cases it might be much more convenient to use something like this
> framework:
> http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#start
>
> Instead of dealing with actual XML nodes you deal with your data objects
> only.
>
> Write: With the current version of Yanel, one could use this already when
> persisting XML (you only tell Yarep to add a new node and then you directly
> write into that outputstream, this write procedure can be taken over from
> the framework above (factory: store object).
>
> Read: Yarep returns nodes. So the framework's factory can be used to create
> your data objects by simply passing the inputstream of the node and you are
> done.
>
> This is just an idea how to get rid of dealing with XML as such and would
> eliminate a lot of boilerplate code in your projects. Maybe the Yanel staff
> can take a look at this and think about possible usage of this.
>
> Cheers
>
hello balz, hello all

thanks for sharing this. i just tried the simple-xml lib and i had a 
very pleasant expirience. i had worked with several techniques to 
read/modify/write xml with java. e.g. jdom, dom4j, avalon configure. but 
simple-xml was way the closest to get the java feeling.
you don't have to read the xml and going from tag to tag and add the 
values to your objects. with simple-xml you read the xml and get the 
objects.

i hope to find soon time to solve a yanel task with the help of 
simple-xml. maybe reading/modifying/writing the sitetree would be nice.

thanks
simon




More information about the Yanel-development mailing list