users@jaxb.java.net

Re: Don't understand how to map a node

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Sat, 31 Oct 2009 16:27:50 +0100

Looks as if you just missed the correct combination:

@XmlElement( name = "Model", namespace = "org.omg/UML/1.4" )

The name field is *always* a NCName (without NS prefix and colon).
A namespace field *always* refers to the URI defining the namespace.
A prefix is just a local "shorthand" within an XML document, can be changed
w/o influence on the processing SW.

-W


On Sat, Oct 31, 2009 at 2:15 PM, Michenux <lmichenaud_at_adeuza.fr> wrote:

>
> I'm trying to map a node using the annotation.
>
> The xml is a xmi file 1.2 ( i have no xsd for that ).
>
> The xml is :
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <XMI xmi.version="1.2" xmlns:UML="org.omg/UML/1.4">
> <XMI.header>
> <XMI.documentation>
> <XMI.exporter>Visual Paradigm for UML</XMI.exporter>
> <XMI.exporterVersion>6.3.0</XMI.exporterVersion>
> </XMI.documentation>
> <XMI.metamodel xmi.name="UML" xmi.version="1.4"/>
> </XMI.header>
> <XMI.content>
> <UML:Model name="export_MI-VP-UML" xmi.id
> ="S4exWtiD.AAAAcUk">
> ...
>
> I don't manage to read the UML:Model node, i have tried with :
> @XmlElement(name="Model")
> private UMLModel model ;
>
> @XmlElement(name="Model",namespace="UML")
> private UMLModel model ;
>
> @XmlElement(name="UML:Model", namespace="org.omg/UML/1.4")
> private UMLModel model ;
>
> But none of these works.
> I have no problem with reading the parent node.
>
> Thanks for your help.
>
> --
> View this message in context:
> http://old.nabble.com/Don%27t-understand-how-to-map-a-node-tp26142270p26142270.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>