code: public Document buildContent(Map<String, Object> content) {
      Document doc = documentBuilder.newDocument();
  
      String primaryType = StringUtils.defaultString((String)content.get(PN_PRIMARY_TYPE), NT_UNSTRUCTURED);
      Element jcrRoot = createJcrRoot(doc, primaryType);
  
      exportPayload(doc, jcrRoot, content);
  
      return doc;
    }
docs: Build XML for any JCR content.
  @param content Content with properties and nested nodes
  @return JCR XML