سؤال

I have a 2D simulation that they want to add X3D to by saving it out and then loading in a viewer for demonstration. I have everything I need from a simulation point of view (ie layout, objects, etc). What I need to do now is to output X3D compliant XML that can be loaded into something like FreeWRL and viewed. I have used JAXB in the past but only for simple tags. X3D has complicated tags with strings in the tag itself as well as in between the tags. Does anyone have any examples/tutorials/classes/etc that they can point me to that will help me get the XML writer part correct so that I can focus on making sure we get all of the 2D simulation components visualized in the 3D world.

هل كانت مفيدة؟

المحلول

You can use an .xsd schema to generate java classes that map to the schema. From there it's a matter of generating the java objects and having jaxb serialize them. http://www.javaworld.com/javaworld/jw-06-2006/jw-0626-jaxb.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top