XmlResourceBase.setDocument

Set a document from external API. Accepts any of:
  • an Xbeans XMLObject
  • String
  • org.w3c.Document
  • any other object (invokes toString() )

Further documentation.

Example 1: (shows XML object)

 // Create XML structure
 var languagesObj = {@code 
                  JavaScript
                  Python
                 };
 // set the document 
 resources.LANGUAGES_XML.setDocument("languages", languagesObj.toXMLString());
 
Example 2: (shows XML String)
 // Create XML structure
 var languagesString = {@code var languages = "JavaScriptPython";};
 // set the document 
 resources.LANGUAGES_XML.setDocument("languages", languagesString);
 

Parameters

java.lang.String  documentName,  java.lang.Object  document,