<xxe-client>,
a custom HTML element defined by JavaScript class (ECMAScript 6 XMLEditor xxeserver, a
WebSocket server, the backend of <xxe-client>,
must run side by side with MyBackend, though not necessarily on
the same server computer.XMLEditor.XMLEditor document.getElementById(id)
or document.getElementsByTagName("xxe-client"). Let's
call this handle xmlEditor.xmlEditor.openDocument(xmlSource,
documentURI)
NoteMethod
openDocument() must be passed a document URI
identifying the document being
edited.XMLEditor makes very few assumptions
about how documents are stored by your web application, so your are
free to use a URI of any kind, suffice for this URI to be meaningful
to your web application.Using custom URI schemes and/or custom
URI authorities is fine as long as the document URI is
hierarchical. The syntax of a document URI is thus:
scheme://authority/path, with
authority being optional. For example, the following
URIs are supported: https://cms.acme.com/docs/manual.xml,
docs:///0943_3561, and the following URIs are not:
mailto:john@acme.com,
urn:isbn:9780582035874.
|
xmlEditor.newDocumentFromTemplate(templateXMLSource,
documentURI) openDocument is
that after invoking newDocumentFromTemplate, the saveAsNeeded XMLEditor is set to true.xmlEditor.saveDocument() saveNeeded XMLEditor is set to
false.xmlEditor.getDocument() xmlEditor.saveDocumentAs(newDocumentURI) documentURI XMLEditor to specified URI,saveNeeded false,saveAsNeeded false.saveStateChanged" listener with
XMLEditor as follows: xmlEditor.addEventListener("saveStateChanged",
listener) SaveStateChangedEvent xmlEditor.closeDocument() XMLEditor, documentIsOpened documentUID documentURI