Re: [Simple-support] Namespace support
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2008-07-30 20:40:14
|
Hi,
I would like to add namespace support, unfortunately setting the name="foo:bar" will not work for deserialization. As the element or attribute name is "bar" and so it will not match. I was thinking of adding a namespace attribute to the annotations. For instance something like:
@Root(name="name", namespace="http://location/path")
public class Type {
@Element(name="blah", namespace="http://domain/path")
private String value;
}
And and a org.simpleframework.xml.stream.Namespace object to the org.simpleframework.xml.stream.Node object. This would then allow you to add custom prefixes or at the very least manipluate the namespaces if needed during serialization. Really not a big fix, and something I have planned for a while but have not really come up with an ideal solution yet.
Niall
--- On Wed, 7/30/08, Patrick Sturm <si...@ge...> wrote:
> From: Patrick Sturm <si...@ge...>
> Subject: [Simple-support] Namespace support
> To: sim...@li...
> Date: Wednesday, July 30, 2008, 5:24 AM
> I was not able to find documents that cover the topic of
> namespaces in
> simple. How would one implement namespaces such as foo:bar.
> I did come
> up with one idea, that involves
> @Element(name="foo:bar"),
> @Root(name="foo:bar") and @Attribute(name...) but
> I suppose that there
> might be a better way.
>
> regards siyb
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|