0

我需要编写一个功能有限的基于 Web 的所见即所得 XML 编辑器。此应用程序可以获取和编辑一些 xml 格式的数据。添加或编辑一些文本并设置一些标签(来自示例)并保存结果。 https://in-frame.com:8088/question.xml 界面可能是这样的:http: //fontoxml.com/fontoxml-demo/有 什么想法或例子吗?

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="style.css" type="text/css"?>
<document>
<header>
    <title>Main Hero</title>
    <description>screenplay</description>
    <header-1>authors:</header-1>
    <authors>
        <autor>Author One</autor>
        <autor>Author Two</autor>
    </authors>
</header>
<body>
    <act id="1">
        <title>Act 1</title>
        <sequence>
            <title>Sequence 1</title>
            <scene id="1" name="Scene One">
                <title>1. Scene One.</title>
                <persons>
                    <person actorId="1" name="Person 1">Person 1,</person>
                    <person actorId="2" name="Person 2">Person 2,</person>
                    <person actorId="3" name="Person 3">Person 3</person>
                </persons>
                <block>
                    <action>
                        Some action <person actorId="1" name="Person 1">Person 1</person>, some other action. <person actorId="2" name="Person 2">Person 2</person> any else.
                    </action>
                </block>
                <block>
                    <person actorId="1" name="Person 1">Person 1
                        <remark>Remark</remark>
                        <dialog>Where are you from?</dialog>
                    </person>
                    <action>Some action <person actorId="1" name="Person 2">Person 2</person> - <person actorId="3" name="Person 3">Person 3</person> some else.</action>
                </block>
                <block>
                    <person actorId="3" name="Person 3">Person 3
                        <dialog>I am from NY!</dialog>
                    </person>
                    <action>Action one.</action>
                    <action pov="yes" pov_person="1">Action two.</action>
                </block>
            </scene>
            <scene id="2" name="Scene 2">
                <title>2. Scene 2.</title>
                <persons>
                    <person actorId="1" name="Person 1">Person 1,</person>
                    <person actorId="2" name="Person 2">Person 2,</person>
                </persons>
                <block>
                    <action pov="yes" pov_person="From cameraof person 1">РОV from Person 1: some action.</action>
                </block>
            </scene>
        </sequence>
    </act>
</body>
</document>
4

1 回答 1

2

这个答案可能来得有点晚,但你可以尝试用Daxe 来做。它允许您为定制的 XML 编辑器构建 Web 用户界面,并具有基于模式的实时验证。您可以选择使用预定义的显示类型(其中一些是所见即所得)来显示元素,或者为您的语言创建新的元素。它可以集成在更大的平台中以处理打开和保存文档。

免责声明:我写的。

于 2017-02-02T19:59:06.977 回答