解决方案 »

  1.   


    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.i99tv.com/base/configuration"  elementFormDefault="qualified">
    <xsd:element name="configuration">
            <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="id" type="xsd:integer" />
    <xsd:element name="name" type="xsd:string" />
    <xsd:element name="homepage" type="xsd:string" />
    <xsd:element name="description" type="xsd:string" />
    <xsd:element name="class" type="xsd:string" />

    <xsd:element name="serie">
    <xsd:complexType>
    <xsd:choice>
    <xsd:element name="link" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:attribute name="type" type="xsd:string" use="required" />
    <xsd:attribute name="value" type="xsd:string"  use="required"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:choice>
    </xsd:complexType>
    </xsd:element>

    <xsd:element name="episode">
    <xsd:annotation>
      <xsd:documentation>
      <![CDATA[
      type="in"  则直接使用指定的属性为详细页地址 <br/>
         type="out" 必须要设置link,而且还要根据link获取详细内容的参数进行指定子节点 <br/>
        
         <parameter name="" property="" />  <br/>
        
         "name"  指url参数名 <br/>
         "property" 指Seire属性--值从里面进行获取 <br/>
       ]]>
      </xsd:documentation>
    </xsd:annotation>

    <xsd:complexType>
    <xsd:choice>
    <xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:attribute name="name" type="xsd:string" />
    <xsd:attribute name="property" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    </xsd:choice>

     <xsd:attribute name="type" type="xsd:string"     use="required" />
         <xsd:attribute name="property" type="xsd:string" use="required" />
         <xsd:attribute name="link" type="xsd:string" />
    </xsd:complexType>

    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
        </xsd:element>
    </xsd:schema>
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration    xmlns="http://www.i99tv.com/base/configuration" 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.i99tv.com/base/configuration http://www.i99tv.com/standard.xsd" >
    <id>101</id>
    <name>天上人间动漫</name>
    <homepage>http://www.52tian.net</homepage>
    <description>此配置针对天上人间动漫进行解析</description>
    <class>parser.x.Tian</class>

    <serie>
    <link type="japan"    value="http://www.52tian.net/----3-------{index}/"  />
    <link type="china"    value="http://www.52tian.net/----1-------{index}/"  />
    <link type="english"  value="http://www.52tian.net/----4-------{index}/"  />
    </serie>

    <episode type="in" property="sourceURL" />
    </configuration>