嗨我想根据这个XSD文件生成一个HTML表单,我知道有Javascript的方式,但我想用PHP,如果可能的话。
我有一个XSD文件如下:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.com/irm" elementFormDefault="qualified" targetNamespace="http://example.com/irm">
<xs:element name="GetOrderInfo">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="getOrderInfoRequest" type="tns:getOrderInfoRequest"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="getOrderInfoRequest">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="OrderID" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="AgentID" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="GetOrderInfoResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="GetOrderInfoResult" type="tns:getOrderInfoResponse"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="getOrderInfoResponse">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="Installments" type="tns:ArrayOfInstallment"/>
<xs:element minOccurs="0" maxOccurs="1" name="CorrelationID" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="Status" type="tns:Status"/>
<xs:element minOccurs="0" maxOccurs="1" name="PolicyInPDF" type="xs:base64Binary"/>
<xs:element minOccurs="1" maxOccurs="1" name="OrderStatus" type="xs:int"/>
<xs:element minOccurs="1" maxOccurs="1" name="BMCoefficient" type="xs:float"/>
<xs:element minOccurs="1" maxOccurs="1" name="GrossWrittenPremium" type="xs:decimal"/>
<xs:element minOccurs="1" maxOccurs="1" name="HasGreenCard" type="xs:boolean"/>
<xs:element minOccurs="1" maxOccurs="1" name="GreenCardStartDate" type="xs:dateTime"/>
</xs:sequence>
</xs:complexType>
有什么建议吗?我正在考虑用PHP读取XSD文件并生成HTML表单之类的内容,然后生成后再发送回服务器。可能吗?提前谢谢。