JASP - Marshall: Root element is not an instance of javax.xml.bind.Element

Soisik Smith <[email protected]> Wed, 4 Aug 2004 06:23:53 -0600
Newsgroups gmane.comp.java.sun.xml.general
Message-ID <LISTSERV%[email protected]>
Hi everybody,

I have a strange behaviour with the marshalling of an XML document. I
generated my classes using jaxb and everything work fine, but...

My root element does not appear in my xml document, it should be like that
as defined in my schema:

<myRootElmt>
   <node></node>
      .....
   <node></node>
</myRootElmt>

but actually it's like that :((

   <node></node>
      .....
   <node></node>

I have an other marshall-unmarshall java process with another type of xml
document and that work fine. I can't see any differences between these two
processes in the schema definition or in the java code neither.

The only difference I found out is, in the case of it's not working fine,
that my root element object is not an instance of javax.xml.bind.Element,
and it's an instance of javax.xml.bind.Element when it's work fine.

So my question is, how can I use a root element that is an instance of
javax.xml.bind.Element and finally see my root node in my xml ? What's
more, I would be really happy if somebody could give me an explanation
about this dark mystery !

Thank you for your support,

Soisik


xml.

-----------------------------------------------------
xml-interest: A list for discussing XML technologies in the Java Platform.
To post, mailto:[email protected]
Archives at: http://archives.java.sun.com/xml-interest.html
To unsubscribe, mailto:[email protected] the following message;
signoff xml-interest.