code: public static CmsXmlContent createDocument(CmsObject cms, Locale locale, String modelUri) throws CmsException {
  
          // create the XML content
          CmsXmlContent content = new CmsXmlContent(cms, locale, modelUri);
          // call prepare for use content handler and return the result
          return content.getContentDefinition().getContentHandler().prepareForUse(cms, content);
      }
docs: Create a new instance of an XML content based on the given default content,
  hat will have all language nodes of the default content and ensures the presence of the given locale.<p>
  
  The given encoding is used when marshalling the XML again later.<p>
  
  @param cms the current users OpenCms content
  @param locale the locale to generate the default content for
  @param modelUri the absolute path to the XML content file acting as model
  
  @throws CmsException in case the model file is not found or not valid
  
  @return the created XML content