使用XML提供图形表单/模板



所以我使用了一个程序,它的模板显示如下:模板示例模板基于可以导出的XML。

我希望能够做的是获取导出的XML,并创建自己的查看器(与此查看器类似(,并使用XML来查看它所来自的软件之外的内容。我已经看过了,但找不到太多关于如何做到这一点的信息。

<templates xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" systemVersionId="4" mkbVersion="170.0.0.0" xmlns="http://www.e-mis.com/emisopen">
<id>03dc83f1-9de5-47da-92de-681486ce658e</id>
<templateName>test template</templateName>
<creationTime>2020-03-15T14:56:54.7105576+00:00</creationTime>
<author>
<system>
<systemType>EMISWEB</systemType>
<displayName>test, test (Dr)</displayName>
</system>
</author>
<definition>
<template>
<page>
<page>
<title>COVID19 - NICE(NG165)</title>
<panel>
<promptForDate>false</promptForDate>
<mandatory>false</mandatory>
<panel>
<title>Links and guidance</title>
<createComponentsAsChildren>false</createComponentsAsChildren>
<component>
<id>3c3c878a-a71e-4c69-a54a-6cd56903081f</id>
<label>We are continually collating the latest evidence and handy links for COVID19 here 👉🎁</label>
<promptForDate>false</promptForDate>
<mandatory>false</mandatory>
<hyperlink>
<title>We are continually collating the latest evidence and handy links for COVID19 here 👉🎁</title>
<URL></URL>
</hyperlink>
</component>
<component>
<id>01935239-f461-4624-b230-110a5bdd03c2</id>
<label>There is a lot of evidence based supporting information on this template. Please take your time to get familiar with it before use.  
(Version updated 20/01/2021)
Data marked ** is included in national surveillance uploads so complete if relevant
</label>
<promptForDate>false</promptForDate>
<mandatory>false</mandatory>
<textDisplay>
<text>{rtf1ansiansicpg1252deff0deflang2057{fonttbl{f0fnilfcharset0 Tahoma;}}
{colortbl ;red87green85blue81;red237green28blue36;}
viewkind4uc1pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803cf1f0fs16 There is a lot of evidence based supporting information on this template. Please take your time to get familiar with it before use.  par
(Version updated 20/01/2021)fs18par
cf2b Data marked ** is included in national surveillance uploads so complete if relevantcf1b0par
cf0par
}
</text>
XForms可用于在浏览器中呈现此类XML文档。XSLTForms(我自己的实现,位于https://github.com/AlainCouthures/declarative4all/raw/master/public/direct/xsltforms.zip)还不支持RTF输出,但可以很容易地添加一些库,例如https://github.com/tbluemel/rtf.js

最新更新