[x3d-public] Announcing! Alpha version of XML2X3DJSON

John Carlson yottzumm at gmail.com
Tue Mar 6 18:39:34 PST 2018


Convert X3D XML to X3D JSON in JavaScript (possibly on the client side, haven’t tried yet)!

Clone:
	$ git clone https://github.com/coderextreme/X3DJSONLD
	(requires git)

Execute against data:
	$ cd X3DJSONLD
	$ npm install
	(requires node.js, maven, java, perl, sh—not optional, need node modules)
	$ cd src/main/shell
	$ find ../data/*.x3d|grep -v new | xargs node ../node/xml2all.js
	(run under bash or sh)
	$ cd ../data
	(pick up data in *.json.new)

Individual files:
	$ node ../node/xml2all.js ../data/__________foo__________.x3d
	(pick up data in __________foo__________.json.new
	

Outstanding bugs:
1) FieldValue value types are not considered if not explicit, and values are treated as strings
2) \ escaping in scripts is not the same as X3dToJson.xslt…not sure if it works or not.
3) Nothing has been visualized yet, merely compared to existing JSON

Issue Reporting:
	https://github.com/coderextreme/X3DJSONLD/issues

Main files in src/main/node:
	DOM2JSONSerializer.js – DOM to JSON converter
	ConvertXML.js – XML to DOM to serializer, file I/O, string handling
	Xml2all.js – node command line utility, pass XML files
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180306/1198c0b3/attachment.html>


More information about the x3d-public mailing list