<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>function convertXmlToJson(xmlString, path) {<br>
              output = SaxonJS.transform({<br>
                      stylesheetLocation:
      "../lib/stylesheets/X3dToJson.sef.json",<br>
                      sourceLocation: path,<br>
                      destination: "serialized",<br>
                      outputProperties: { method: "json" }<br>
              }, "sync");<br>
              let jsobj = output.principalResult;<br>
              jsobj = JSON.parse(jsobj);<br>
              console.log(jsobj);<br>
              return jsobj;</p>
    <p><br>
      The above is what I have so far.  Some combination of xmlString
      (preferred) or perhaps path should be used.</p>
    <p>Here's the include I use in HTML:<br>
    </p>
    <p><script type="text/javascript"
      src="../node/saxon-js/SaxonJS2.js"></script></p>
    <p>I ran out of steam while debugging.</p>
    <p>John<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 9/28/21 3:03 AM, John Carlson wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGC3UEmpVJjO-i0usnN_W5qrVSWkWQ38vsWxxT+m4PS42xGKvw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto"><br>
      </div>
      <div>
        <div class="gmail_quote">
          <div dir="auto">Pulled from another message.</div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">Andreas, I think you like to do demos. Could
            you do a demo of Saxonjs2 in the browser? Perhaps converting
            XML to JSON? Apparently, compiled stylesheets are a
            requirement.   I think we have a good opportunity to reduce
            server loads.   I’d like to keep my website thin.</div>
          <div>
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                <div link="blue" vlink="#954F72"
                  style="word-wrap:break-word" lang="EN-US">
                  <div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>
        </div>
      </div>
      <div dir="auto">I am struggling, but I could give you where I left
        off.</div>
      <div dir="auto"><br>
      </div>
      <div dir="auto">I just need someone to push through with a
        solution.</div>
    </blockquote>
  </body>
</html>