Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Edit the Type of a Column in a XML Schema?

Status
Not open for further replies.

rarich01

Programmer
Oct 22, 2001
14
0
0
US
I have the following XML schema:

<xs:schema id=&quot;NewDataSet&quot;>
<xs:element name=&quot;NewDataSet&quot; msdata:IsDataSet=&quot;true&quot;>
<xs:complexType>
<xs:choice maxOccurs=&quot;unbounded&quot;>
<xs:element name=&quot;tblCostData&quot;>
<xs:complexType>
<xs:sequence>
<xs:element name=&quot;JobID&quot; type=&quot;xs:int&quot;/>
<xs:element name=&quot;ActualCost&quot; type=&quot;xs:decimal&quot;/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

This schema belongs to a table in my database (tblCostData). Basically, what I would like to do is programatically change the type of the second element (ActualCost) from decimal to double, using ASP.Net.

Any ideas????
 
If you open the schema in an XMLDataDocument you can get acces to the element via XPath and then using setAttribut change the value of the attribute to xs:double.

What you then do with it I am not sure. If nobody replies quicker I will get back to you later after I have played around a bit.

James :)



James Culshaw
james@miniaturereview.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top