Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generic Flavored XML
Message
De
25/08/2007 15:39:46
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
Tous
Information générale
Forum:
Internet
Catégorie:
XML
Titre:
Generic Flavored XML
Divers
Thread ID:
01250455
Message ID:
01250455
Vues:
56
I am trying to create an XML document that has a pointer to an external schema on the local file system. I am trying to make the XML as generic as possible so it can be read by several development environments. I seem to remember doing this a few years ago and having problems creating generic enough XML.

Here is my main XML document:
<CAPCO1>
<PRSDIE>
<D_NUMBER>000244010DI</D_NUMBER>
<D_SIZE></D_SIZE>
<D_NUM_PORTS>0</D_NUM_PORTS>
<D_PORT_TYPE></D_PORT_TYPE>
<D_DESC>FEATURE STRIP</D_DESC>
<D_LOCATION></D_LOCATION>
</PRSDIE>                             
</CAPCO1>
Here is my intended schema:
<?xml version="1.0"?>
<xs:schema><xs:element name="PRSDIE">
    <xs:complexType>
      <xs:sequence>
	<xs:element name="D_NUMBER" type="xs:string"/>
	<xs:element name="D_SIZE" type="xs:string"/>
	<xs:element name="D_NUM_PORTS" type="xs:integer"/>
	<xs:element name="D_PORT_TYPE" type="xs:string"/>
	<xs:element name="D_DESC" type="xs:string"/>
	<xs:element name="D_LOCATION" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
</xs:element></xs:schema> 
I guess my first question is if the schema is a generic schema. I created one in the .NET designer and there was a lot more garbage that I am unconcered with.

My second question is how do I reference the schema if it is in a different file?

Thanks for any help!
Very fitting: http://xkcd.com/386/
Répondre
Fil
Voir

Click here to load this message in the networking platform