利用structureId获得CmsXmlContent对象

想在save的时候保存,structureId,然后通过StructureId创建一个CmsXmlContent对象,我的思路是:

通过CmsJspActionElement获得CmsObject
调用org.opencms.file.CmsObject 的
public CmsResource readResource(CmsUUID structureID)
                         throws CmsException
然后调用org.opencms.xml.content.CmsXmlContentFactory 的
public static CmsXmlContent unmarshal(CmsObject cms,
                                      CmsResource resource,
                                      javax.servlet.ServletRequest req)
                               throws CmsXmlException,
                                      CmsLoaderException,
                                      CmsException

还没有试过,明天试一下,看看行不行

你可能感兴趣的:(xml,cms,servlet)