tag:blogger.com,1999:blog-1710464868724994296.post918174790593136307..comments2023-06-29T09:48:09.653-04:00Comments on Java XML and JSON Binding: JAXB & XML Infoset PreservationBlaise Doughanhttp://www.blogger.com/profile/02016807982653343777noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-1710464868724994296.post-8289387026173495232013-06-06T14:57:21.369-04:002013-06-06T14:57:21.369-04:00Could you log a bug for the issue you are seeing?
...Could you log a bug for the issue you are seeing?<br />- <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink" rel="nofollow">https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink</a>Blaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-64431894171444820342013-05-29T06:03:34.353-04:002013-05-29T06:03:34.353-04:00Binder is very good for using. but i have one issu...Binder is very good for using. but i have one issue while using binder. i did the above sample and removed the value of name and run again. The empty name tag created again and again. can any one please help me? thanks in advance. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-81791138677018925702012-11-29T01:16:08.766-05:002012-11-29T01:16:08.766-05:00Awesome. Thanks for that!Awesome. Thanks for that!Anonymoushttps://www.blogger.com/profile/02516018965887169858noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-22745663926616631802011-10-20T16:23:12.617-04:002011-10-20T16:23:12.617-04:00I believe some relevant information from your comm...I believe some relevant information from your comment was lost due to the formatting constraints of the comment section. Feel free to send me a message via my <a href="http://blog.bdoughan.com/p/contact_01.html" rel="nofollow">Contact Me</a> page to start an email discussion on this issue.<br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-5095232798858928872011-10-20T06:16:13.157-04:002011-10-20T06:16:13.157-04:00Hi Doughan,
How can append the data into existing ...Hi Doughan,<br />How can append the data into existing xml file. <br />existing.xml<br /><br /> Simple text <br /><br /><br />following this example http://blogs.oracle.com/CoreJavaTechTips/entry/exchanging_data_with_xml_and1 and getting result e.g.<br /><br /> Simple text <br /><br /><br /> Simple text <br /> <br /><br />but i am expecting as,<br /><br /> Simple text <br /> Simple textBibhawhttps://www.blogger.com/profile/07236946286845408944noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-18321661975554090252011-04-11T13:27:53.829-04:002011-04-11T13:27:53.829-04:00Hi Silver,
If you make changes to the XML, you ca...Hi Silver,<br /><br />If you make changes to the XML, you can apply it back to the object model using <a href="http://download.oracle.com/javase/6/docs/api/javax/xml/bind/Binder.html#updateJAXB%28XmlNode%29" rel="nofollow">updateJAXB</a> on Binder.<br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-20826796939345610622011-04-09T16:17:44.359-04:002011-04-09T16:17:44.359-04:00While using a XML file under action script, the xm...While using a XML file under action script, the xml file is modified and I am unable to use the modified XM?Silver MLMhttp://www.cointree.com/noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-11403077774944357792010-12-07T06:41:27.400-05:002010-12-07T06:41:27.400-05:00YES!
Thank you!
My new problem is that the new el...YES!<br />Thank you!<br /><br />My new problem is that the new element I created with java code was added to the xml with a new namespace ns0 and the root node of the new element as new attributes defining this new namespace...<br /><br />But I'll figure it out ...<br /><br />Thanks again!Ranhttps://www.blogger.com/profile/04283958579830158054noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-6017038666949274512010-12-06T15:44:25.995-05:002010-12-06T15:44:25.995-05:00Hi Enrico,
If you are just creating a DOM with co...Hi Enrico,<br /><br />If you are just creating a DOM with comments and using a Transformer to write the document to an OutputStream, there shouldn't be anything special you need to do. It may be a bug in the implementation of Transformer you are using.<br /><br />If you are seeing the comments disappear when running the Binder example you may be using the Metro JAXB implemenation (which is included with Java SE 6), instead of the MOXy implementation. To use MOXy you will need to add the necessary jaxb.properties file. I have updated the example to include this step.<br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-1737190350019837432010-12-06T07:34:16.343-05:002010-12-06T07:34:16.343-05:00I'm facing the same issue with the comments be...I'm facing the same issue with the comments being omitted but the problem doesn't seem to be with JAXB. I'm at a point where I've got an instance of org.w3c.dom.Document that has comments in it (saw it using debugger)<br />but printing using the transformer (as your code) doesn't show the comments.<br />I created the document from the xml using <br /><br />DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();<br />dbf.setNamespaceAware(true);<br />// Preserve Lexical Info<br />dbf.setCoalescing(false);<br />dbf.setExpandEntityReferences(false);<br />dbf.setIgnoringElementContentWhitespace(false);<br />dbf.setIgnoringComments(false);<br /><br />This made the Document keep the comments. Any idea how I can print the document WITH the comments?Ranhttps://www.blogger.com/profile/04283958579830158054noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-59445116701822161542010-10-19T12:14:27.306-04:002010-10-19T12:14:27.306-04:00This example was created with MOXy JAXB you will n...This example was created with <a href="http://www.eclipse.org/eclipselink/moxy.php" rel="nofollow">MOXy JAXB</a> you will need to ensure that you specify the necessary jaxb.properties file. For more information see my post: <a href="http://bdoughan.blogspot.com/2010/07/jaxb-xml-binding-standard.html" rel="nofollow">JAXB - The XML Binding Standard</a>.<br /><br />There appears to be a bug with Metro JAXB (the reference implementation) regarding the Binder.Blaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-65051603182398425832010-10-19T03:35:53.513-04:002010-10-19T03:35:53.513-04:00Hi,
Binder is a very good thing, but when I test y...Hi,<br />Binder is a very good thing, but when I test your sample, all comments are removed ! And idea for the issue ?<br />Thanks advanceUnknownhttps://www.blogger.com/profile/07188434847310176855noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-44487706569143347172010-10-03T06:15:33.209-04:002010-10-03T06:15:33.209-04:00Thanks a lot!Thanks a lot!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-84535520866450178022010-09-28T12:48:27.120-04:002010-09-28T12:48:27.120-04:00coolcoolsombrikshttps://www.blogger.com/profile/14894526362667566048noreply@blogger.com