如何创建.Xsd文件以验证Xml文件,因为我已附加代码所以请给我.Xsd文件 [英] How To Create .Xsd File For Validation Of Xml File As I Have Attached The Code So Please Give Me The .Xsd File

查看:66
本文介绍了如何创建.Xsd文件以验证Xml文件,因为我已附加代码所以请给我.Xsd文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <?  xml     version   =  1.0    编码  = < span class =code-keyword> UTF-8  >  
< 文档 >
< 属性 >
< 属性 < span class =code-attribute> name = page_height value = 468 / >
< Property 名称 = page_width value = 684 / >
< 属性 name = margin_left value = 0 / >
< 属性 name = margin_right value = 0 / >
< 属性 名称 = margin_top value = 0 / >
< 属性 名称 = margin_bottom value = 0 / >
< 属性 名称 = overflow_margin_top value = 0 / >
< 属性 名称 = overflow_margin_bottom value = 0 / >
< / Properties >
< Section name = description = 明信片前面 >
< Page 名称 = 首页 description = 明信片的首页 >
< 区域 名称 = Front_Photo description = background image type = 图像 categoryName = Postcard_Front_Photo >
< 图片 name = Front_Photo offsetX = 9 offsetY = 9 positionType = 绝对 width = 666 height = 450 / >
< / Zone >
< / Page >
< /部分 >
< 部分 名称 = 返回 description = 明信片背面 >
< Page 名称 = 返回页面 description = 返回页面明信片 >
< 区域 名称 = Back_Photo description = background image type = 图像 categoryName = Postcard_Back_Photo >
< 图像 名称 = Back_Photo offsetX = 9 offsetY = 9 positionType = 绝对 width = 666 height = 450 / >
< / Zone >
< 区域 name = Back_Address description = 邮寄地址 type = 文字 categoryName = 文字 > ;
< 段落 名称 = Back_Address offsetX = 358 offsetY = 189 < span class =code-attribute> positionType = 绝对 width = 289 height = 100 > < HTMLBlock 名称 = Back_Address / > < /段落 >
< < span class =code-leadattribute> / Zone >
< 区域 名称 = Back_Indicia description = 许可证附在订单 type = 文字 categoryName = 文字 >
< 段落 名称 = Back_Indicia offsetX = 534 offsetY = 325 positionType = 绝对 width = 113 height = 100 > < HTMLBlock 名称 = Back_Indicia / > < /段落 >
< / Zone >
< / Page >
< / Section >
< /文件 >

解决方案

有很多可用的在线工具可以完成任务。下面是其中之一。



免费在线XSD / XML模式生成器 [ ^ ]

<?xml version="1.0" encoding="UTF-8"?>
<Document>
    <Properties>
        <Property name="page_height" value="468"/>
        <Property name="page_width" value="684"/>
        <Property name="margin_left" value="0"/>
        <Property name="margin_right" value="0"/>
        <Property name="margin_top" value="0"/>
        <Property name="margin_bottom" value="0"/>
        <Property name="overflow_margin_top" value="0"/>
        <Property name="overflow_margin_bottom" value="0"/>
    </Properties>
    <Section name="Front" description="Front of Postcard">
        <Page name="Front Page" description="Front Page of Postcard">
            <Zone name="Front_Photo" description="background image" type="Image" categoryName="Postcard_Front_Photo">
                <Image name="Front_Photo" offsetX="9" offsetY="9" positionType="absolute" width="666" height="450"/>
            </Zone>
        </Page>
    </Section>
    <Section name="Back" description="Back of Postcard">
        <Page name="Back Page" description="Back Page of Postcard">
            <Zone name="Back_Photo" description="background image" type="Image" categoryName="Postcard_Back_Photo">
                <Image name="Back_Photo" offsetX="9" offsetY="9" positionType="absolute" width="666" height="450"/>
            </Zone>
            <Zone name="Back_Address" description="mailing address" type="Text" categoryName="Text">
                <Paragraph name="Back_Address" offsetX="358" offsetY="189" positionType="absolute" width="289" height="100"><HTMLBlock name="Back_Address"/></Paragraph>
            </Zone>
            <Zone name="Back_Indicia" description="permit affixed upon order" type="Text" categoryName="Text">
                <Paragraph name="Back_Indicia" offsetX="534" offsetY="325" positionType="absolute" width="113" height="100"><HTMLBlock name="Back_Indicia"/></Paragraph>
            </Zone>
        </Page>
    </Section>
</Document>

解决方案

There are plenty of online tools available that will do the task. Below is one of them.

Free Online XSD/XML Schema Generator[^]


这篇关于如何创建.Xsd文件以验证Xml文件,因为我已附加代码所以请给我.Xsd文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆