> But the problem that I want to check the value of the third tag
> <csv:field> to know if it contain 0 or 1
> Can anyone help me on this
You would need to change your schema substantially to use e.g.
<xs:element name="field3">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:maxInclusive value="1"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
That is only possible if you choose different element names and types
for the fields, that is not possible with one field element of type
xs:string.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mahmoud - 06 May 2008 16:03 GMT
> > But the problem that I want to check the value of the third tag
> > <csv:field> to know if it contain 0 or 1
[quoted text clipped - 17 lines]
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
Thanks Martin for your reply
But the problem that the xml doesn’t contain fields names as you see
so I do not have element name “field3" so if you have any idea to get
the third element it will be helpful
Martin Honnen - 06 May 2008 16:49 GMT
> But the problem that the xml doesn’t contain fields names as you see
> so I do not have element name “field3" so if you have any idea to get
> the third element it will be helpful
If you want to use the XSD schema language then you will need to change
the schema you have and the XML you have.
As an alternative you could use a language like Schematron to formulate
the condition you have: http://www.schematron.com/

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/