Hi every one,
I am new to xml data files,I have two xml files with same data but only small difference as shown below
<List>
<number>1101</number>
<Area>inner walls in a room.</Area>
<Detection>less pressure.</Detection>
<reason>
<normal>
<Component Num="15" Type="electric">
<Beha Num="97" working="yes" acceptrate="100"/>
</Component>
</normal>
</reason>
<reaction>
<Informal/>
</reaction>
<action>
<Informal>some data here.
</Informal>
</action>
</list>
second xml file
<List>
<number>1102</number>
<Area>outside of room.</Area>
<Detection>more pressure.</Detection>
<reason/>
<reaction>
<Informal/>
</reaction>
<action/>
</list>
In the above two xml files the difference is in second xml file i Have two empty tag elements One is action and another is reason tags. I created one xsd file file using xmlpad for frist xml file and validated using that xsd , Its giving no errors, but when I tried same xsd for second xml file it giving error like.
element action{}has invalid structure for schema definition:(informal)
used xsd is like this
<xs:element name="Action">
<xs:complexType>
<xs:sequence>
<xs:element ref="Informal" minOccures="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Informal" type="xs:string"/>
same error for reason tags also, I tried in different ways but problem not solved can any one suggest me how to solve this problem.
Thanks in advance.