Vs Simple

29 views
Skip to first unread message

Benjamin Darfler

unread,
Dec 31, 2009, 1:41:33 PM12/31/09
to xmappr
I was wondering if anyone can talk briefly about how xmappr stacks up
with simple?

http://simple.sourceforge.net/home.php

Peter Knego

unread,
Jan 1, 2010, 5:56:25 AM1/1/10
to xma...@googlegroups.com
Hi Benjamin,

From a brief look at Simple's dosumentation it seems to be oriented towards object serialization and is as such more comparable to Xstream. Xmappr is designed to support mapping "external" XML, e.g. XML that comes from external sources, where one does not control the schema.

However, given proper configuration, both Simple and Xmappr can perform similar tasks.

Quick comparison checklist :
- configuration via annotations: both
- configuration via xml: Xmappr
- basic Attributes, Elements and Text mappings: both
- nested mappings: both
- mixing Text and Elements: Xmappr
- partial mapping: Xmappr
- constructor injection: Simple (planned for Xmappr)
- default values: Xmappr (is seems that Simple can achieve this via it's Filters)
- namespaces: both
- preserving order of Elements: both

This list was devised from quickly looking at Simple's documentation - please correct me if I got anything wrong. Also the list does not try to cover all features.

Peter

Benjamin Darfler

unread,
Jan 2, 2010, 10:18:36 AM1/2/10
to xmappr
Thanks, thats really helpful. I'll keep all three options in mind for
the future.

Ben

On Jan 1, 5:56 am, Peter Knego <pe...@knego.net> wrote:
> Hi Benjamin,
>
> From a brief look at Simple's dosumentation it seems to be oriented towards
> object serialization and is as such more comparable to Xstream. Xmappr is
> designed to support mapping "external" XML, e.g. XML that comes from
> external sources, where one does not control the schema.
>
> However, given proper configuration, both Simple and Xmappr can perform
> similar tasks.
>
> Quick comparison checklist :
> - configuration via annotations: both
> - configuration via xml: Xmappr
> - basic Attributes, Elements and Text mappings: both
> - nested mappings: both
> - mixing Text and Elements: Xmappr
> - partial mapping: Xmappr
> - constructor injection: Simple (planned for Xmappr)
> - default values: Xmappr (is seems that Simple can achieve this via it's
> Filters)
> - namespaces: both
> - preserving order of Elements: both
>
> This list was devised from quickly looking at Simple's documentation -
> please correct me if I got anything wrong. Also the list does not try to
> cover all features.
>

Pangea

unread,
Jan 6, 2010, 3:01:54 PM1/6/10
to xmappr
whats the advantage of partial mapping (apart from the fact that i
dont need those extra elements/attributes)??? we are parsing the whole
doc anyway!. are there any performance improvements of using partial
mapping?

Peter Knego

unread,
Jan 6, 2010, 3:07:29 PM1/6/10
to xma...@googlegroups.com
The main advantage is to avoid the extra mapping configuration (which can be substantial in some cases).
As I noted in another reply - there is no way around parsing the whole XML document. XML is a stream of data and is not a random access medium.
Partial mapping still processes the XML and stores it internally. So I expect no substantial speed improvements versus full mapping.

Peter
Reply all
Reply to author
Forward
0 new messages