Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » how to remove xsd xsi xsi:type from generated xml element
how to remove xsd xsi xsi:type from generated xml element [message #1104299] Sun, 08 September 2013 05:30 Go to next message
jason zhang is currently offline jason zhangFriend
Messages: 31
Registered: July 2009
Member
I am using dynamic Moxy to generate xml file. The DynamicJaxbContext is built from MetadataSource. Here is the example xml file I got
<ns0:SingleInt xmlns:ns0="...">
   <DateCreated xmlns:xsd="..." xmlns:xsi="..." xsi:type="xsd:dateTime">2013-09-07T22:24:14.404</DateCreated>
   <allowedWithDefault xmlns:xsd="..." xmlns:xsi="..." xsi:type="xsd:int">503</allowedWithDefault>
</ns0:SingleInt>


You see every element has the xsd, xsi, xsi:type. How can I remove those things?

thanks
Re: how to remove xsd xsi xsi:type from generated xml element [message #1106065 is a reply to message #1104299] Tue, 10 September 2013 16:40 Go to previous messageGo to next message
jason zhang is currently offline jason zhangFriend
Messages: 31
Registered: July 2009
Member
I figured this out. I need to specify type information in oxm.xml
Re: how to remove xsd xsi xsi:type from generated xml element [message #1106809 is a reply to message #1106065] Wed, 11 September 2013 15:24 Go to previous message
Blaise Doughan is currently offline Blaise DoughanFriend
Messages: 163
Registered: July 2009
Senior Member

That's correct. For Dynamic JAXB without the type specify it will be treated as type java.lang.Object which will cause the xsi:type attribute to be written out. In this case the xsi:type is necessary to round trip the document.
Previous Topic:Automatically generated table maps java.util.Date to VARCHAR
Next Topic:Name collision when using super-type in moxy oxm.xml
Goto Forum:
  


Current Time: Fri Apr 19 21:24:19 GMT 2024

Powered by FUDForum. Page generated in 0.03093 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top