Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Omitting a field in XML
Message
De
30/09/2007 12:55:12
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
29/09/2007 04:00:21
Information générale
Forum:
Internet
Catégorie:
XML
Divers
Thread ID:
01257516
Message ID:
01257636
Vues:
20
I've tried that already but it doesn't seem to work correctly.

>minOccurs=0 ?
>
>>I have the following schema:
>>
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>	<xs:element name="PRSDIE">
>>		<xs:complexType>
>>			<xs:sequence>
>>				<xs:element ref="D_NUMBER"/>
>>				<xs:element ref="D_SIZE"/>
>>				<xs:element ref="D_NUM_PORTS"/>
>>				<xs:element ref="D_PORT_TYPE"/>
>>				<xs:element ref="D_DESC"/>
>>				<xs:element ref="D_LOCATION"/>
>>			</xs:sequence>
>>		</xs:complexType>
>>	</xs:element>
>>	<xs:element name="D_SIZE" type="xs:string"/>
>>	<xs:element name="D_PORT_TYPE" type="xs:string"/>
>>	<xs:element name="D_NUM_PORTS" type="xs:integer"/>
>>	<xs:element name="D_NUMBER" type="xs:string"/>
>>	<xs:element name="D_LOCATION" type="xs:string"/>
>>	<xs:element name="D_DESC" type="xs:string"/>
>>	<xs:element name="CAPCO1">
>>		<xs:complexType>
>>			<xs:sequence>
>>				<xs:element ref="PRSDIE" maxOccurs="unbounded"/>
>>			</xs:sequence>
>>		</xs:complexType>
>>	</xs:element>
>></xs:schema>
>>
>>
>>I need to change it so all fields are optional, and the tags don't even need to exist in the file. Now if I omit the tags themselves I get an error when I import into a .NET dataset. Any advice out there?
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform