<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div> Replace this function in X3DJSONLD.java:</div><div><br></div><div> public void CDATACreateFunction(Document document, Element element, JsonArray value) {</div><div> // System.err.println("GOT HERE IN CDATA");</div><div> StringBuffer sb = new StringBuffer();</div><div> for (int i = 0; i < value.size(); i++) {</div><div> if (i > 0) {</div><div> sb.append("\n");</div><div> }</div><div> sb.append(value.get(i).toString()</div><div> // .replaceAll("
", "")</div><div> .replaceAll("^\"", "")</div><div> .replaceAll("\\\\t", "\t")</div><div> .replaceAll("\"$", "")</div><div> .replaceAll("<", "<")</div><div> .replaceAll(">", ">")</div><div> .replaceAll("&", "&")</div><div> .replaceAll(""", "\""));</div><div> // .replaceAll("'([^'\r\n]*)\n([^']*)'", "'$1\\r\\n$2'")</div><div> }</div><div> String str = sb.toString();</div><div> CDATASection cdata = document.createCDATASection(str);</div><div> element.appendChild(cdata);</div><div> }</div></div></div><div><br></div>Add this at line 72 of Validate.java:<div><br></div><div> transformer.setOutputProperty(OutputKeys.CDATA_SECTION_ELEMENTS, "Script");</div><div><br></div><div>I will check in new <a href="https://coderextreme.net/x3dschema">https://coderextreme.net/x3dschema</a> files when testing is complete</div><div><br></div><div>John<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 30, 2023 at 4:49 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">When converting JSON to XML, X3DJSONLD.java does not do a complete job, leaving entities, escaped tabs, and quotes.<div><br></div><div>I am trying to clean it up.</div><div><br></div><div>Thanks fof your patience.</div><div><br></div><div>John</div></div>
</blockquote></div></div></div></div>