将 xml 数据上传到 Umbraco
Upload xml data to umbraco
我是 Umbraco 的新手,但我需要找到一种将内容部署到我们拥有的 Umbraco 实例的自动化方式。作为开发人员,我们希望通过 xml 文件将节点上传到 Umbraco(以便我们可以签入)。
我想知道 Umbraco 是否有办法以编程方式上传 xml 数据?
谢谢!
创建一个 page/controller/surface 控制器,您可以在其中上传 XML 文件,然后遍历 XML 并使用 Umbraco 的 ContentService. You can create the nodes using the .CreateContent method then assign the values to the newly created node, and then .PublishWithStatus 创建节点以发布新节点.
我是 Umbraco 的新手,但我需要找到一种将内容部署到我们拥有的 Umbraco 实例的自动化方式。作为开发人员,我们希望通过 xml 文件将节点上传到 Umbraco(以便我们可以签入)。 我想知道 Umbraco 是否有办法以编程方式上传 xml 数据?
谢谢!
创建一个 page/controller/surface 控制器,您可以在其中上传 XML 文件,然后遍历 XML 并使用 Umbraco 的 ContentService. You can create the nodes using the .CreateContent method then assign the values to the newly created node, and then .PublishWithStatus 创建节点以发布新节点.