9 个解决方案
#1
mark
#2
http://www.stylusstudio.com/xml_generator.html
#3
谢谢蒋晟的回复,但是我无法使用这样的工具来生成XML的
跟相关的人沟通了一下,他的回复是:
"what u will have to do is create objects of this dummy values and call serialize method to convert objects to xml"
所以我肯定没办法使用工具输出XML文件了,有这样现成的类吗?麻烦再多点提示,谢谢
跟相关的人沟通了一下,他的回复是:
"what u will have to do is create objects of this dummy values and call serialize method to convert objects to xml"
所以我肯定没办法使用工具输出XML文件了,有这样现成的类吗?麻烦再多点提示,谢谢
#4
我是否应该构建一个可以生成产生数据的类?如何构建呢?
#5
mark不懂
#6
用xsd.exe生成一个类,编译生成的代码,再序列化到XML
#7
蒋晟,新年好,很抱歉再次打搅你,我在使用XSD.exe生成类文件的时候出现了问题:
“Warning: cannot generate classes because no top-level elements with complex type were found.”
我要生成C#类的xsd文件包含了其他的一些XSD文件,好像不太好弄,希望大侠你能指点,谢谢了!
<XSD文件随后附上,谢谢咧:D>
“Warning: cannot generate classes because no top-level elements with complex type were found.”
我要生成C#类的xsd文件包含了其他的一些XSD文件,好像不太好弄,希望大侠你能指点,谢谢了!
<XSD文件随后附上,谢谢咧:D>
#8
<?xml version="1.0" encoding="UTF-8" ?>
<schema targetNamespace="http://schemas.microsoft.com/msus/2002/12/ReleaseProposal" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:rel="http://schemas.microsoft.com/msus/2002/12/ReleaseProposal" xmlns:pub="http://schemas.microsoft.com/msus/2002/12/Publishing" xmlns:upd="http://schemas.microsoft.com/msus/2002/12/Update" xmlns:bt="http://schemas.microsoft.com/msus/2002/12/BaseTypes" xmlns:drv="http://schemas.microsoft.com/msus/2002/12/Handlers/WindowsDriver" elementFormDefault="qualified" attributeFormDefault="unqualified">
<annotation>
<documentation>
Release specific xml schema
</documentation>
</annotation>
<!--
Imported schemas
-->
<import namespace="http://schemas.microsoft.com/msus/2002/12/BaseTypes" schemaLocation="BaseTypes.xsd" />
<import namespace="http://schemas.microsoft.com/msus/2002/12/Update" schemaLocation="Update.xsd" />
<import namespace="http://schemas.microsoft.com/msus/2002/12/Publishing" schemaLocation="Publishing.xsd" />
<element name="ReleaseProposal" type="rel:ReleaseProposal"/>
<complexType name="ReleaseProposal">
<annotation>
<documentation>
Represents release proposal for a particular case. All the elements are optional as in different scenarios many of them are not required.
For example I can simple save to disk by putting in release date and time.
</documentation>
</annotation>
<sequence>
<element name="Case" type="rel:Case" minOccurs="1" maxOccurs="1"/>
<!-- Release Plan -->
<element name="ReleasePlan" type="rel:ReleasePlan" minOccurs="0" maxOccurs="1"/>
<!-- Update Properties -->
<element name="Properties" type="rel:Properties" minOccurs="0" maxOccurs="1"/>
<!-- Installation impact -->
<element name="InstallationImpact" type="rel:InstallationImpact" minOccurs="0" maxOccurs="1"/>
<!-- Exception bug number -->
<element name="ExceptionBugNumbers" type="rel:BugNumbersString" minOccurs="0" maxOccurs="1" />
<!-- Update proposal -->
<element name="UpdateProposalList" type="rel:UpdateProposalList" minOccurs="0" maxOccurs="1" />
<!-- Planned changes - This is not finalized. PM to follow up on how API users will use this.-->
<element name="PlannedChanges" type="rel:PlannedChanges" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="ReleaseId" type="bt:Guid" use="required"/>
<attribute name="ReleaseDateTime" type="dateTime" use="required" />
</complexType>
<complexType name="InstallationImpact">
<annotation>
<documentation>
Installation impact due to this update
</documentation>
</annotation>
<attribute name="RebootBehavior" type="upd:InstallationRebootBehavior" use="optional" default="NeverReboots" />
<attribute name="RequireExclusiveInstallation" type="boolean" use="optional" default="false"/>
<attribute name="CanRequestUserInput" type="boolean" use="optional" default="false"/>
<attribute name="CanUninstallViaAddRemovePrograms" type="boolean" use="optional" default="true"/>
<attribute name="CanUninstallViaWSUS" type="boolean" use="optional" default="true"/>
</complexType>
<complexType name="Change">
<sequence>
<element name="UpdateId" type="bt:Guid" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name ="ChangeName" type="rel:ChangeName" use="required"/>
<attribute name="ChangeDescription" type="rel:STString1500" use="required"/>
</complexType>
<complexType name="PlannedChanges">
<annotation>
<documentation>
Planned changes for this update.
</documentation>
</annotation>
<sequence>
<element name="Change" type="rel:Change" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</schema>
#9
由于内容过长,我只好省略了很多复杂类型的元素
#1
mark
#2
http://www.stylusstudio.com/xml_generator.html
#3
谢谢蒋晟的回复,但是我无法使用这样的工具来生成XML的
跟相关的人沟通了一下,他的回复是:
"what u will have to do is create objects of this dummy values and call serialize method to convert objects to xml"
所以我肯定没办法使用工具输出XML文件了,有这样现成的类吗?麻烦再多点提示,谢谢
跟相关的人沟通了一下,他的回复是:
"what u will have to do is create objects of this dummy values and call serialize method to convert objects to xml"
所以我肯定没办法使用工具输出XML文件了,有这样现成的类吗?麻烦再多点提示,谢谢
#4
我是否应该构建一个可以生成产生数据的类?如何构建呢?
#5
mark不懂
#6
用xsd.exe生成一个类,编译生成的代码,再序列化到XML
#7
蒋晟,新年好,很抱歉再次打搅你,我在使用XSD.exe生成类文件的时候出现了问题:
“Warning: cannot generate classes because no top-level elements with complex type were found.”
我要生成C#类的xsd文件包含了其他的一些XSD文件,好像不太好弄,希望大侠你能指点,谢谢了!
<XSD文件随后附上,谢谢咧:D>
“Warning: cannot generate classes because no top-level elements with complex type were found.”
我要生成C#类的xsd文件包含了其他的一些XSD文件,好像不太好弄,希望大侠你能指点,谢谢了!
<XSD文件随后附上,谢谢咧:D>
#8
<?xml version="1.0" encoding="UTF-8" ?>
<schema targetNamespace="http://schemas.microsoft.com/msus/2002/12/ReleaseProposal" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:rel="http://schemas.microsoft.com/msus/2002/12/ReleaseProposal" xmlns:pub="http://schemas.microsoft.com/msus/2002/12/Publishing" xmlns:upd="http://schemas.microsoft.com/msus/2002/12/Update" xmlns:bt="http://schemas.microsoft.com/msus/2002/12/BaseTypes" xmlns:drv="http://schemas.microsoft.com/msus/2002/12/Handlers/WindowsDriver" elementFormDefault="qualified" attributeFormDefault="unqualified">
<annotation>
<documentation>
Release specific xml schema
</documentation>
</annotation>
<!--
Imported schemas
-->
<import namespace="http://schemas.microsoft.com/msus/2002/12/BaseTypes" schemaLocation="BaseTypes.xsd" />
<import namespace="http://schemas.microsoft.com/msus/2002/12/Update" schemaLocation="Update.xsd" />
<import namespace="http://schemas.microsoft.com/msus/2002/12/Publishing" schemaLocation="Publishing.xsd" />
<element name="ReleaseProposal" type="rel:ReleaseProposal"/>
<complexType name="ReleaseProposal">
<annotation>
<documentation>
Represents release proposal for a particular case. All the elements are optional as in different scenarios many of them are not required.
For example I can simple save to disk by putting in release date and time.
</documentation>
</annotation>
<sequence>
<element name="Case" type="rel:Case" minOccurs="1" maxOccurs="1"/>
<!-- Release Plan -->
<element name="ReleasePlan" type="rel:ReleasePlan" minOccurs="0" maxOccurs="1"/>
<!-- Update Properties -->
<element name="Properties" type="rel:Properties" minOccurs="0" maxOccurs="1"/>
<!-- Installation impact -->
<element name="InstallationImpact" type="rel:InstallationImpact" minOccurs="0" maxOccurs="1"/>
<!-- Exception bug number -->
<element name="ExceptionBugNumbers" type="rel:BugNumbersString" minOccurs="0" maxOccurs="1" />
<!-- Update proposal -->
<element name="UpdateProposalList" type="rel:UpdateProposalList" minOccurs="0" maxOccurs="1" />
<!-- Planned changes - This is not finalized. PM to follow up on how API users will use this.-->
<element name="PlannedChanges" type="rel:PlannedChanges" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="ReleaseId" type="bt:Guid" use="required"/>
<attribute name="ReleaseDateTime" type="dateTime" use="required" />
</complexType>
<complexType name="InstallationImpact">
<annotation>
<documentation>
Installation impact due to this update
</documentation>
</annotation>
<attribute name="RebootBehavior" type="upd:InstallationRebootBehavior" use="optional" default="NeverReboots" />
<attribute name="RequireExclusiveInstallation" type="boolean" use="optional" default="false"/>
<attribute name="CanRequestUserInput" type="boolean" use="optional" default="false"/>
<attribute name="CanUninstallViaAddRemovePrograms" type="boolean" use="optional" default="true"/>
<attribute name="CanUninstallViaWSUS" type="boolean" use="optional" default="true"/>
</complexType>
<complexType name="Change">
<sequence>
<element name="UpdateId" type="bt:Guid" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name ="ChangeName" type="rel:ChangeName" use="required"/>
<attribute name="ChangeDescription" type="rel:STString1500" use="required"/>
</complexType>
<complexType name="PlannedChanges">
<annotation>
<documentation>
Planned changes for this update.
</documentation>
</annotation>
<sequence>
<element name="Change" type="rel:Change" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</schema>
#9
由于内容过长,我只好省略了很多复杂类型的元素