<div dir="ltr"><div><div><div>Sounds good.<br></div>Currently, I'm working on a nodejs project and I need to check if the json data I've just created match to a valid X3D (xml) content.<br></div>Is there already something available for such a conversion?<br><br></div>Clement.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 2, 2015 at 11:59 PM, John Carlson <span dir="ltr"><<a href="mailto:john@carlsonsolutiondesign.com" target="_blank">john@carlsonsolutiondesign.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Available here: <a href="http://coderextreme.net/x3djson.js" target="_blank">http://coderextreme.net/x3djson.js</a><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>John</div></font></span><div><div class="h5">
<div><br>
</div>
<div><br>
<div>
<blockquote type="cite">
<div>On Sep 2, 2015, at 4:52 PM, John Carlson <<a href="mailto:john@carlsonsolutiondesign.com" target="_blank">john@carlsonsolutiondesign.com</a>> wrote:</div>
<br>
<div>
<div style="word-wrap:break-word">
Running
<div><br>
</div>
<div>
<div style="margin:0px;font-size:11px;font-family:Menlo">$ java -jar jsonix-schema-compiler/full/target/jsonix-schema-compiler-full-2.3.7-SNAPSHOT.jar x3d-3.4.xsd  -b x3d.xjb -p x3djson</div>
<div style="margin:0px;font-size:11px;font-family:Menlo"><br>
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo">will create x3djson.js with x3djson variable defined</div>
<div style="margin:0px;font-size:11px;font-family:Menlo"><br>
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo">John</div>
<div><br>
</div>
<div>
<blockquote type="cite">
<div>On Sep 2, 2015, at 4:28 PM, John Carlson <<a href="mailto:john@carlsonsolutiondesign.com" target="_blank">john@carlsonsolutiondesign.com</a>> wrote:</div>
<br>
<div>
<div style="word-wrap:break-word">
I ran the following with full path names.  I have not verified this script.  Use at your own risk!   But it should work.  If you don’t want to bother, see the attached JSON schema file.
<div><br>
</div>
<div>Download Maven 3
<div><br>
</div>
<div>Download <a href="https://github.com/highsource/jsonix-schema-compiler/" target="_blank">https://github.com/highsource/jsonix-schema-compiler/</a></div>
<div><br>
</div>
<div>$ git clone <a href="https://github.com/highsource/jsonix-schema-compiler/" target="_blank">https://github.com/highsource/jsonix-schema-compiler/</a></div>
<div><br>
</div>
<div>$ cd jsonix-schema-compiler</div>
<div><br>
</div>
<div>$ mvn install</div>
<div><br>
</div>
<div>Download X3D 3.4 schema</div>
<div><span style="font-family:Menlo;font-size:11px"><br>
</span></div>
<div>$ <span style="font-family:Menlo;font-size:11px">wget <a href="http://www.web3d.org/specifications/x3d-3.4.xsd" target="_blank">
http://www.web3d.org/specifications/x3d-3.4.xsd</a></span></div>
<div>
<div style="margin:0px;font-size:11px;font-family:Menlo">$ wget <a href="http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPublic.xsd" target="_blank">
http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPublic.xsd</a></div>
<div style="margin:0px;font-size:11px;font-family:Menlo">$ wget <a href="http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPrivate.xsd" target="_blank">
http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPrivate.xsd</a></div>
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo"><br>
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo">
<div style="margin:0px">$ java -jar full/target/jsonix-schema-compiler-full-2.3.7-SNAPSHOT.jar x3d-3.4.xsd </div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">Look at generated.js</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">Note that there’s an error from the command-line.  This page: <a href="http://techiquest.blogspot.com/2012/02/xml-schema-to-java-binding-large.html" target="_blank">http://techiquest.blogspot.com/2012/02/xml-schema-to-java-binding-large.html</a></div>
<div style="margin:0px">says to change the configuration like this:</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">
<pre style="font-size:15.3999996185303px;line-height:19.25px;margin-top:0px;margin-bottom:0px"><span style="color:rgb(6,40,115);font-weight:bold"><jaxb:bindings</span> </pre>
<pre style="font-size:15.3999996185303px;line-height:19.25px;margin-top:0px;margin-bottom:0px"><span style="color:rgb(64,112,160)">        schemaLocation="file:SWIFT-FIN-November-2011-Data-Dictionary.xsd"</span><span style="color:rgb(6,40,115);font-weight:bold">></span>
        <span style="color:rgb(6,40,115);font-weight:bold"><jaxb:bindings></span>
            <span style="color:rgb(6,40,115);font-weight:bold"><jaxb:globalBindings</span> <span style="color:rgb(64,112,160)">typesafeEnumMaxMembers="600"</span><span style="color:rgb(6,40,115);font-weight:bold">/></span>
        <span style="color:rgb(6,40,115);font-weight:bold"></jaxb:bindings></span>
<span style="color:rgb(6,40,115);font-weight:bold"></jaxb:bindings></span></pre>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>However, I created my own x3d.xjb file that look like this:</div>
<div><br>
</div>
<div>
<div style="margin:0px"><?xml version="1.0" ?></div>
<div style="margin:0px"><bindings version="1.0" xmlns="<a href="http://java.sun.com/xml/ns/jaxb" target="_blank">http://java.sun.com/xml/ns/jaxb</a>" schemaLocation="x3d-3.4.xsd"></div>
<div style="margin:0px">        <bindings></div>
<div style="margin:0px">            <globalBindings typesafeEnumMaxMembers="600"/></div>
<div style="margin:0px">        </bindings></div>
<div style="margin:0px"></bindings></div>
</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">And ran:</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">
<div style="margin:0px">$ java -jar full/target/jsonix-schema-compiler-full-2.3.7-SNAPSHOT.jar x3d-3.4.xsd  -b x3d.xjb </div>
<div><br>
</div>
<div><br>
</div>
<div>without errors. Hopefully the generated.js will work for you.  Attached.</div>
</div>
</div>
</div>
</div>
</div>
<span><generated.js></span>
<div style="word-wrap:break-word">
<div>
<div style="margin:0px;font-size:11px;font-family:Menlo">
<div style="margin:0px">
<div style="margin:0px">
<div></div>
</div>
</div>
</div>
</div>
</div>
<span><x3d.xjb></span>
<div style="word-wrap:break-word">
<div>
<div style="margin:0px;font-size:11px;font-family:Menlo">
<div style="margin:0px">
<div style="margin:0px">
<div><a href="http://coderextreme.net/generated.js" target="_blank">http://coderextreme.net/generated.js</a></div>
<div><a href="http://coderextreme.net/x3d.xjb" target="_blank">http://coderextreme.net/x3d.xjb</a></div>
</div>
</div>
<div style="margin:0px">Note that this schema does not comply with the current X3D JSON proposed standard.  I suggest we start with the JSON schema and modify it to suit our needs.</div>
<div><br>
</div>
</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>

<br>------------------------------------------------------------------------------<br>
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!<br>
Get real-time metrics from all of your servers, apps and tools<br>
in one place.<br>
SourceForge users - Click here to start your Free Trial of Datadog now!<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140" rel="noreferrer" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140</a><br>_______________________________________________<br>
X3dom-users mailing list<br>
<a href="mailto:X3dom-users@lists.sourceforge.net">X3dom-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/x3dom-users" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/x3dom-users</a><br>
<br></blockquote></div><br></div>