<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">John,<br>
<br>
I am wondering how this might differ from the following built-in
capabilities described below. What does your code do differently
than these built-in methods?<br>
<br>
<br>
XD is an (string) XML fragment, then this fragment can be inserted
into the DOM (either as part of the document of a separate
sub-tree) using<br>
<br>
var parser = new DOMParser();<br>
var xmlDom = parser.parserFromString (XD, 'application/xml');<br>
<br>
[Ref: <a class="moz-txt-link-freetext" href="https://developer.mozilla.org/en-US/docs/Web/API/DOMParser">https://developer.mozilla.org/en-US/docs/Web/API/DOMParser</a>]<br>
<br>
At this point xmlDom is a DOM tree, but not inserted into the HTML
document DOM.<br>
<br>
It is possible to go back to XML string using<br>
<br>
var S = new XMLSerializer();<br>
var xmlString = s.serializeToString (xmlDom);<br>
<br>
[Ref:
<a class="moz-txt-link-freetext" href="https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer">https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer</a>]<br>
<br>
There is the JSON.stringify method <br>
<br>
[Ref:
<a class="moz-txt-link-freetext" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify</a>
and
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/46880822/how-to-json-stringify-a-dom-element">https://stackoverflow.com/questions/46880822/how-to-json-stringify-a-dom-element</a>
- answer 1]<br>
<br>
There is at least one other GItHub project
(<a class="moz-txt-link-freetext" href="https://gist.github.com/sstur/7379870">https://gist.github.com/sstur/7379870</a>) that converts to/from JSON
and strings/DOM.<br>
<br>
Going from an internal object to JSON takes a little careful work
to make sure the tree is correctly handled and the code does not
follow the circular loops that are present in DOM.<br>
<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
<br>
</div>
<blockquote type="cite"
cite="mid:5ab03d55.1c69fb81.972e6.0a05@mx.google.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal">The X3D JSON Loader now converts XML to
JSON client-side, for your nefarious purposes!</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a class="moz-txt-link-freetext" href="https://coderextreme.net/X3DJSONLD/src/main/html/index.html">https://coderextreme.net/X3DJSONLD/src/main/html/index.html</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Enjoy loading!</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">John<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
x3d-public mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>
<a class="moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>
</pre>
</blockquote>
<p><br>
</p>
<div class="moz-signature">-- <br>
<font class="tahoma,arial,helvetica san serif" color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
3D Systems & Cloud Consultant<br>
LA ACM SIGGRAPH Past Chair<br>
President, Daly Realism - <i>Creating the Future</i>
</font></div>
</body>
</html>