[x3d-public] HelloWorld.x3d export from X3D JSON HelloWorld.json load. Eyes wanted

John Carlson yottzumm at gmail.com
Mon Dec 6 17:54:18 PST 2021


Here is the XML export from a JSON file (HelloWorld.json attached) 
loaded by x3dinput.py (there are some changes if you want an updated 
copy).  If you want the python code to do this, contact me.  I do have 
local modifications to x3d.py which will currently be required.  Don, 
can you add **kwargs to JSON and XML methods for x3d.py, perhaps, and 
only have self and **kwargs as parameters?  Thanks!

A good eye (or if someone wants do do a roundtrip test) at detecting 
differences between the XML and the JSON is desired. I've already 
spotted two comments missing!  In particular, if there's a specific 
ordering required in the XML, that would be good to know.  I'm off to 
see what's wrong with the comments!

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" 
"https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3' 
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' 
xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d
-3.3.xsd'>
  <head>
    <meta content='HelloWorld.x3d' name='title'/>
    <meta content='Simple X3D model example: Hello World!' 
name='description'/>
    <meta content='30 October 2000' name='created'/>
    <meta content='11 June 2021' name='modified'/>
    <meta content='Don Brutzman' name='creator'/>
    <meta content='HelloWorld.tall.png' name='Image'/>
    <meta content='https://en.wikipedia.org/wiki/Hello_world' 
name='reference'/>
    <meta 
content='https://en.wikipedia.org/wiki/Hello#.22Hello.2C_World.22_computer_program' 
name='reference'/>
    <meta 
content='https://en.wikipedia.org/wiki/"Hello,_World!"_program' 
name='reference'/>
    <meta 
content='https://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world' 
name='reference'/>
    <meta content='https://www.HelloWorldExample.net' name='reference2'/>
    <meta content='https://www.web3d.org' name='reference'/>
    <meta 
content='https://www.web3d.org/realtime-3d/news/internationalization-x3d' 
name='reference'/>
    <meta 
content='https://www.web3d.org/x3d/content/examples/HelloWorld.x3d' 
name='reference'/>
    <meta 
content='https://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorld.x3d' 
name='reference'/>
    <meta 
content='https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.x3d' 
name='identifier'/>
    <meta 
content='https://www.web3d.org/x3d/content/examples/license.html' 
name='license'/>
    <meta content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit' 
name='generator'/>
    <meta content='HelloWorld.wrl' name='reference'/>
    <meta content='HelloWorld.x3dv' name='reference'/>
    <meta content='HelloWorld.x3db' name='reference'/>
    <meta content='HelloWorld.xhtml' name='reference'/>
    <meta content='HelloWorld.json' name='reference'/>
    <meta content='14 October 2021' name='translated'/>
    <meta content='X3dToJson.xslt, 
https://www.web3d.org/x3d/stylesheets/X3dToJson.html' name='generator'/>
    <meta content='X3D JSON encoding: 
https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding' name='reference'/>
  </head>
  <Scene>
<!-- Example scene to illustrate X3D nodes and fields (XML elements and 
attributes) -->
<WorldInfo info='"Example scene to illustrate a simple X3D model"' 
title='Hello World!'/>
<Group>
<Viewpoint DEF='ViewUpClose' centerOfRotation='0 -1 0' 
description='Hello world!' position='0 -1 7'/>
<Transform rotation='0 1 0 3'>
<Shape>
  <Appearance>
    <Material DEF='MaterialOffWhite' diffuseColor='0.980392 0.976471 
0.964706'/>
    <ImageTexture DEF='ImageCloudlessEarth' url='"earth-topo.png" 
"earth-topo.jpg" "earth-topo-small.gif" 
"https://www.web3d.org/x3d/content/examples/Basic/earth-to
po.png" 
"https://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg" 
"https://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif"'/>
  </Appearance>
<Sphere/>
</Shape>
</Transform>
<Transform translation='0 -2 0'>
<Shape>
  <Appearance>
    <Material USE='MaterialOffWhite'/>
  </Appearance>
<Text DEF='TextMessage' string='"Hello" "world!"'>
  <FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
</Shape>
</Transform>
</Group>
  </Scene>
</X3D>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211206/0cc899e0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld.json
Type: application/json
Size: 7592 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211206/0cc899e0/attachment-0001.json>


More information about the x3d-public mailing list